From d1cacdf86f7c265ab0915e58449dad914e19ca64 Mon Sep 17 00:00:00 2001 From: Jim Wigginton Date: Sat, 30 May 2009 16:40:31 +0000 Subject: [PATCH] - Net_SSH2::login() didn't always return true when it should have git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@37 21d32557-59b3-4da0-833f-c5933fad653e --- phpseclib/Net/SSH2.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index 76bbeaa4..df28fb5e 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -41,7 +41,7 @@ * @author Jim Wigginton * @copyright MMVII Jim Wigginton * @license http://www.gnu.org/licenses/lgpl.txt - * @version $Id: SSH2.php,v 1.16 2009-05-30 15:41:39 terrafrost Exp $ + * @version $Id: SSH2.php,v 1.17 2009-05-30 16:40:31 terrafrost Exp $ * @link http://phpseclib.sourceforge.net */ @@ -551,7 +551,7 @@ class Net_SSH2 { if (ord($response[0]) != NET_SSH2_MSG_KEXINIT) { user_error('Expected SSH_MSG_KEXINIT', E_USER_NOTICE); - return false; + return; } if (!$this->_key_exchange($response)) { @@ -1127,6 +1127,8 @@ class Net_SSH2 { return $this->_disconnect(NET_SSH2_DISCONNECT_KEY_EXCHANGE_FAILED); } $this->compress = $compression_algorithms[$i] == 'zlib'; + + return true; } /**