mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-01-28 01:28:27 +00:00
Merge branch '1.0' into 2.0
This commit is contained in:
commit
6e9ece958b
@ -423,7 +423,7 @@ class SFTP extends SSH2
|
|||||||
|
|
||||||
$this->channel_status[self::CHANNEL] = NET_SSH2_MSG_CHANNEL_OPEN;
|
$this->channel_status[self::CHANNEL] = NET_SSH2_MSG_CHANNEL_OPEN;
|
||||||
|
|
||||||
$response = $this->_get_channel_packet(self::CHANNEL);
|
$response = $this->_get_channel_packet(self::CHANNEL, true);
|
||||||
if ($response === false) {
|
if ($response === false) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -444,7 +444,7 @@ class SFTP extends SSH2
|
|||||||
|
|
||||||
$this->channel_status[self::CHANNEL] = NET_SSH2_MSG_CHANNEL_REQUEST;
|
$this->channel_status[self::CHANNEL] = NET_SSH2_MSG_CHANNEL_REQUEST;
|
||||||
|
|
||||||
$response = $this->_get_channel_packet(self::CHANNEL);
|
$response = $this->_get_channel_packet(self::CHANNEL, true);
|
||||||
if ($response === false) {
|
if ($response === false) {
|
||||||
// from PuTTY's psftp.exe
|
// from PuTTY's psftp.exe
|
||||||
$command = "test -x /usr/lib/sftp-server && exec /usr/lib/sftp-server\n" .
|
$command = "test -x /usr/lib/sftp-server && exec /usr/lib/sftp-server\n" .
|
||||||
@ -468,7 +468,7 @@ class SFTP extends SSH2
|
|||||||
|
|
||||||
$this->channel_status[self::CHANNEL] = NET_SSH2_MSG_CHANNEL_REQUEST;
|
$this->channel_status[self::CHANNEL] = NET_SSH2_MSG_CHANNEL_REQUEST;
|
||||||
|
|
||||||
$response = $this->_get_channel_packet(self::CHANNEL);
|
$response = $this->_get_channel_packet(self::CHANNEL, true);
|
||||||
if ($response === false) {
|
if ($response === false) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -2970,7 +2970,7 @@ class SFTP extends SSH2
|
|||||||
|
|
||||||
// SFTP packet length
|
// SFTP packet length
|
||||||
while (strlen($this->packet_buffer) < 4) {
|
while (strlen($this->packet_buffer) < 4) {
|
||||||
$temp = $this->_get_channel_packet(self::CHANNEL);
|
$temp = $this->_get_channel_packet(self::CHANNEL, true);
|
||||||
if (is_bool($temp)) {
|
if (is_bool($temp)) {
|
||||||
$this->packet_type = false;
|
$this->packet_type = false;
|
||||||
$this->packet_buffer = '';
|
$this->packet_buffer = '';
|
||||||
@ -2987,7 +2987,7 @@ class SFTP extends SSH2
|
|||||||
|
|
||||||
// SFTP packet type and data payload
|
// SFTP packet type and data payload
|
||||||
while ($tempLength > 0) {
|
while ($tempLength > 0) {
|
||||||
$temp = $this->_get_channel_packet(self::CHANNEL);
|
$temp = $this->_get_channel_packet(self::CHANNEL, true);
|
||||||
if (is_bool($temp)) {
|
if (is_bool($temp)) {
|
||||||
$this->packet_type = false;
|
$this->packet_type = false;
|
||||||
$this->packet_buffer = '';
|
$this->packet_buffer = '';
|
||||||
|
@ -3637,7 +3637,7 @@ class SSH2
|
|||||||
$data = $this->_string_shift($response, $length);
|
$data = $this->_string_shift($response, $length);
|
||||||
$this->stdErrorLog.= $data;
|
$this->stdErrorLog.= $data;
|
||||||
if ($skip_extended || $this->quiet_mode) {
|
if ($skip_extended || $this->quiet_mode) {
|
||||||
break;
|
continue;
|
||||||
}
|
}
|
||||||
if ($client_channel == $channel && $this->channel_status[$channel] == NET_SSH2_MSG_CHANNEL_DATA) {
|
if ($client_channel == $channel && $this->channel_status[$channel] == NET_SSH2_MSG_CHANNEL_DATA) {
|
||||||
return $data;
|
return $data;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user