mirror of
https://github.com/danog/tgseclib.git
synced 2024-11-27 12:44:38 +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:
parent
b2262f731d
commit
742fbc188f
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user