1
0
mirror of https://github.com/danog/phpseclib.git synced 2024-12-12 09:09:39 +01:00

timeout in _get_channel_packet during _init_sftp_connection should be a failure

This commit is contained in:
Nick Lassonde 2021-07-26 11:35:56 -07:00 committed by terrafrost
parent a02526e5e0
commit dab514faff

View File

@ -526,6 +526,8 @@ class Net_SFTP extends Net_SSH2
$response = $this->_get_channel_packet(NET_SFTP_CHANNEL, true); $response = $this->_get_channel_packet(NET_SFTP_CHANNEL, true);
if ($response === false) { if ($response === false) {
return false; return false;
} else if ($response === true && $this->isTimeout()) {
return false;
} }
$packet = pack( $packet = pack(
@ -572,6 +574,8 @@ class Net_SFTP extends Net_SSH2
if ($response === false) { if ($response === false) {
return false; return false;
} }
} else if ($response === true && $this->isTimeout()) {
return false;
} }
$this->channel_status[NET_SFTP_CHANNEL] = NET_SSH2_MSG_CHANNEL_DATA; $this->channel_status[NET_SFTP_CHANNEL] = NET_SSH2_MSG_CHANNEL_DATA;