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

SSH2: return false (without error) on channel failure

Also update error message. SFTP, for example, makes a channel request even though it's not asking to open a pseudo-terminal.
This commit is contained in:
terrafrost 2013-05-14 16:16:06 -05:00
parent b2262f731d
commit 742fbc188f

View File

@ -2592,9 +2592,10 @@ class Net_SSH2 {
switch ($type) {
case NET_SSH2_MSG_CHANNEL_SUCCESS:
return true;
//case NET_SSH2_MSG_CHANNEL_FAILURE:
case NET_SSH2_MSG_CHANNEL_FAILURE:
return false;
default:
user_error('Unable to request pseudo-terminal');
user_error('Unable to request fulfill channel request');
return $this->_disconnect(NET_SSH2_DISCONNECT_BY_APPLICATION);
}
case NET_SSH2_MSG_CHANNEL_CLOSE: