mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-27 03:42:40 +00:00
Merge branch '1.0' into 2.0
This commit is contained in:
commit
53dcc19441
@ -592,6 +592,20 @@ class SSH2
|
|||||||
*/
|
*/
|
||||||
var $window_size = 0x7FFFFFFF;
|
var $window_size = 0x7FFFFFFF;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* What we resize the window to
|
||||||
|
*
|
||||||
|
* When PuTTY resizes the window it doesn't add an additional 0x7FFFFFFF bytes - it adds 0x40000000 bytes.
|
||||||
|
* Some SFTP clients (GoAnywhere) don't support adding 0x7FFFFFFF to the window size after the fact so
|
||||||
|
* we'll just do what PuTTY does
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
* @see self::_send_channel_packet()
|
||||||
|
* @see self::exec()
|
||||||
|
* @access private
|
||||||
|
*/
|
||||||
|
var $window_resize = 0x40000000;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Window size, server to client
|
* Window size, server to client
|
||||||
*
|
*
|
||||||
@ -3695,11 +3709,13 @@ class SSH2
|
|||||||
|
|
||||||
// resize the window, if appropriate
|
// resize the window, if appropriate
|
||||||
if ($this->window_size_server_to_client[$channel] < 0) {
|
if ($this->window_size_server_to_client[$channel] < 0) {
|
||||||
$packet = pack('CNN', NET_SSH2_MSG_CHANNEL_WINDOW_ADJUST, $this->server_channels[$channel], $this->window_size);
|
// PuTTY does something more analogous to the following:
|
||||||
|
//if ($this->window_size_server_to_client[$channel] < 0x3FFFFFFF) {
|
||||||
|
$packet = pack('CNN', NET_SSH2_MSG_CHANNEL_WINDOW_ADJUST, $this->server_channels[$channel], $this->window_resize);
|
||||||
if (!$this->_send_binary_packet($packet)) {
|
if (!$this->_send_binary_packet($packet)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$this->window_size_server_to_client[$channel]+= $this->window_size;
|
$this->window_size_server_to_client[$channel]+= $this->window_resize;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
|
Loading…
Reference in New Issue
Block a user