Skip to content

Commit

Permalink
Merge branch '1.15' into 1.16
Browse files Browse the repository at this point in the history
  • Loading branch information
bitprophet committed Jan 1, 2016
2 parents 641b748 + 38cc76f commit df43fe9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
13 changes: 7 additions & 6 deletions paramiko/auth_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ def _interactive_query(self, q):
m.add_string(p[0])
m.add_boolean(p[1])
self.transport._send_message(m)

def _parse_userauth_request(self, m):
if not self.transport.server_mode:
# er, uh... what?
Expand Down Expand Up @@ -495,8 +495,9 @@ def _parse_userauth_request(self, m):
m.add_string(token)
self.transport._send_message(m)
else:
raise SSHException("Client asked to handle paket %s"
%MSG_NAMES[ptype])
result = AUTH_FAILED
self._send_auth_result(username, method, result)
return
# check MIC
ptype, m = self.transport.packetizer.read_message()
if ptype == MSG_USERAUTH_GSSAPI_MIC:
Expand Down Expand Up @@ -568,7 +569,7 @@ def _parse_userauth_banner(self, m):
lang = m.get_string()
self.transport._log(INFO, 'Auth banner: %s' % banner)
# who cares.

def _parse_userauth_info_request(self, m):
if self.auth_method != 'keyboard-interactive':
raise SSHException('Illegal info request from server')
Expand All @@ -580,14 +581,14 @@ def _parse_userauth_info_request(self, m):
for i in range(prompts):
prompt_list.append((m.get_text(), m.get_boolean()))
response_list = self.interactive_handler(title, instructions, prompt_list)

m = Message()
m.add_byte(cMSG_USERAUTH_INFO_RESPONSE)
m.add_int(len(response_list))
for r in response_list:
m.add_string(r)
self.transport._send_message(m)

def _parse_userauth_info_response(self, m):
if not self.transport.server_mode:
raise SSHException('Illegal info response from server')
Expand Down
3 changes: 3 additions & 0 deletions sites/www/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog
=========

* :bug:`652` Fix behavior of ``gssapi-with-mic`` auth requests so they fail
gracefully (allowing followup via other auth methods) instead of raising an
exception. Patch courtesy of ``@jamercee``.
* :support:`636` Clean up and enhance the README (and rename it to
``README.rst`` from just ``README``). Thanks to ``@LucasRMehl``.
* :release:`1.16.0 <2015-11-04>`
Expand Down

0 comments on commit df43fe9

Please sign in to comment.