diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index 6c71f3ac..1658c553 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -2468,7 +2468,9 @@ class SSH2 $this->send_binary_packet($packet, $logged); $response = $this->get_binary_packet(); - + if ($response === false) { + return false; + } list($type) = Strings::unpackSSH2('C', $response); switch ($type) { case NET_SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ: // in theory, the password can be changed