summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2017-02-20 13:38:42 -0800
committerJeff Forcier <jeff@bitprophet.org>2017-02-20 13:38:42 -0800
commitb74ad50d4637084b5e7caf800639dccb3278f531 (patch)
tree95ecd2757c99a3bfa6835f0c0d04690cad20b1fc
parentc978a6bff03e2c2b620ff485c987ff5311dad97d (diff)
parenta54326cae2bc837d496fadcaf7957531f11ff6f7 (diff)
downloadparamiko-b74ad50d4637084b5e7caf800639dccb3278f531.tar.gz
Merge branch '1.17' into 889-int
-rw-r--r--paramiko/auth_handler.py2
-rw-r--r--paramiko/message.py16
-rw-r--r--sites/www/changelog.rst3
3 files changed, 6 insertions, 15 deletions
diff --git a/paramiko/auth_handler.py b/paramiko/auth_handler.py
index 38b23729..cab27a88 100644
--- a/paramiko/auth_handler.py
+++ b/paramiko/auth_handler.py
@@ -597,7 +597,7 @@ class AuthHandler (object):
for i in range(n):
responses.append(m.get_text())
result = self.transport.server_object.check_auth_interactive_response(responses)
- if isinstance(type(result), InteractiveQuery):
+ if isinstance(result, InteractiveQuery):
# make interactive query instead of response
self._interactive_query(result)
return
diff --git a/paramiko/message.py b/paramiko/message.py
index bf4c6b95..05c1dd4c 100644
--- a/paramiko/message.py
+++ b/paramiko/message.py
@@ -144,9 +144,6 @@ class Message (object):
def get_int(self):
"""
Fetch an int from the stream.
-
- @return: a 32-bit unsigned integer.
- @rtype: int
"""
return struct.unpack('>I', self.get_bytes(4))[0]
@@ -176,24 +173,15 @@ class Message (object):
def get_text(self):
"""
- Fetch a string from the stream. This could be a byte string and may
- contain unprintable characters. (It's not unheard of for a string to
- contain another byte-stream Message.)
-
- @return: a string.
- @rtype: string
+ Fetch a Unicode string from the stream.
"""
- return u(self.get_bytes(self.get_int()))
- #return self.get_bytes(self.get_size())
+ return u(self.get_string())
def get_binary(self):
"""
Fetch a string from the stream. This could be a byte string and may
contain unprintable characters. (It's not unheard of for a string to
contain another byte-stream Message.)
-
- @return: a string.
- @rtype: string
"""
return self.get_bytes(self.get_int())
diff --git a/sites/www/changelog.rst b/sites/www/changelog.rst
index a64ef608..36ef443f 100644
--- a/sites/www/changelog.rst
+++ b/sites/www/changelog.rst
@@ -2,6 +2,9 @@
Changelog
=========
+* :bug:`895` Fix a bug in server-mode concerning multiple interactive auth
+ steps (which were incorrectly responded to). Thanks to Dennis Kaarsemaker for
+ catch & patch.
* :support:`866 backported` (also :issue:`838`) Remove an old test-related file
we don't support, and add PyPy to Travis-CI config. Thanks to Pierce Lopez
for the final patch and Pedro Rodrigues for an earlier edition.