SSH2: make login method return false under rare situation

This commit is contained in:
terrafrost 2022-05-04 01:18:33 -05:00
parent 2b5ecd3315
commit a965060d81

View File

@ -2468,7 +2468,9 @@ class SSH2
$this->send_binary_packet($packet, $logged); $this->send_binary_packet($packet, $logged);
$response = $this->get_binary_packet(); $response = $this->get_binary_packet();
if ($response === false) {
return false;
}
list($type) = Strings::unpackSSH2('C', $response); list($type) = Strings::unpackSSH2('C', $response);
switch ($type) { switch ($type) {
case NET_SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ: // in theory, the password can be changed case NET_SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ: // in theory, the password can be changed