1
0
mirror of https://github.com/danog/tgseclib.git synced 2024-11-27 04:34:45 +01:00

- fixed a bug in keyboard-interactive authentication (thanks, j31!)

git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@121 21d32557-59b3-4da0-833f-c5933fad653e
This commit is contained in:
Jim Wigginton 2010-09-12 22:12:45 +00:00
parent 202c3b64e9
commit bbe68cf7ae

View File

@ -60,7 +60,7 @@
* @author Jim Wigginton <terrafrost@php.net>
* @copyright MMVII Jim Wigginton
* @license http://www.gnu.org/licenses/lgpl.txt
* @version $Id: SSH2.php,v 1.51 2010-09-12 21:58:54 terrafrost Exp $
* @version $Id: SSH2.php,v 1.52 2010-09-12 22:12:45 terrafrost Exp $
* @link http://phpseclib.sourceforge.net
*/
@ -1338,7 +1338,14 @@ class Net_SSH2 {
// multi-factor authentication
extract(unpack('Nlength', $this->_string_shift($response, 4)));
$auth_methods = explode(',', $this->_string_shift($response, $length));
return in_array('keyboard-interactive', $auth_methods) ? $this->_keyboard_interactive_login($username, $password) : false;
if (in_array('keyboard-interactive', $auth_methods)) {
if ($this->_keyboard_interactive_login($username, $password)) {
$this->bitmap |= NET_SSH2_MASK_LOGIN;
return true;
}
return false;
}
return false;
case NET_SSH2_MSG_USERAUTH_SUCCESS:
$this->bitmap |= NET_SSH2_MASK_LOGIN;
return true;