SSH2: check response in exec()

This commit is contained in:
terrafrost 2013-05-08 11:44:34 -05:00
parent 63ec6e2055
commit b440708a7b

View File

@ -2085,6 +2085,11 @@ class Net_SSH2 {
return false;
}
if (ord($response[0]) != NET_SSH2_MSG_CHANNEL_SUCCESS) {
user_error('exec call refused');
return;
}
$this->channel_status[NET_SSH2_CHANNEL_EXEC] = NET_SSH2_MSG_CHANNEL_DATA;
if (!$block || $this->in_request_pty_exec) {