FtpURLConnection: Throw on invalid characters in commands.

RFC 959 says :

<string> ::= <char> | <char><string>
<char> ::= any of the 128 ASCII characters except <CR> and <LF>

Some commands have even stricter requirements, but are currently
unused by this implementation.

Bug: 36637271
Test: FtpURLConnectionTest with manual intervention, the test cannot
      be backported due to issues with dependencies.

Change-Id: Ic2eb918930e3696cc9a20a309ad6c23cf6e58efb
(cherry picked from commit d6a72fe81bcc3e8be3ead3c0f84806bc9f1a979a)
2 files changed