diff options
author | Anselm Kruis <a.kruis@science-computing.de> | 2015-03-20 11:52:23 +0100 |
---|---|---|
committer | Anselm Kruis <a.kruis@science-computing.de> | 2015-03-20 12:31:41 +0100 |
commit | 838e02ab4287b40c6ea043abcd5a0065ef9554c8 (patch) | |
tree | 17bd15d6304b7751b9604a86700dc8041ab041c7 /tests/test_transport.py | |
parent | fac347718a69179ba9404d5f5e825798f4ee9379 (diff) |
According to RFC 4254 sec 6.5 the "command" string of an "exec" channel
request is a byte-string. Previously paramiko assumed "command" to be
UTF-8 encoded. Invalid UTF-8 sequences caused an UnicodeDecodeError.
This commit changes a test case to uses a non UTF-8 string and fixes the
bug.
Diffstat (limited to 'tests/test_transport.py')
-rw-r--r-- | tests/test_transport.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_transport.py b/tests/test_transport.py index 485a18e8..fb83fd2f 100644 --- a/tests/test_transport.py +++ b/tests/test_transport.py @@ -246,7 +246,7 @@ class TransportTest(ParamikoTest): chan = self.tc.open_session() schan = self.ts.accept(1.0) try: - chan.exec_command('no') + chan.exec_command(b'command contains \xfc and is not a valid UTF-8 string') self.assertTrue(False) except SSHException: pass |