From 415df3bd45e52a283fca35edccb4505d9ad2aa5f Mon Sep 17 00:00:00 2001 From: terrafrost Date: Thu, 18 Jul 2013 10:35:39 -0500 Subject: [PATCH 1/2] SSH2: attribute newly added comment --- phpseclib/Net/SSH2.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index fe562d99..df3c38db 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -2935,9 +2935,11 @@ class Net_SSH2 { */ function _send_channel_packet($client_channel, $data) { - // The maximum amount of data allowed is determined by the maximum - // packet size for the channel, and the current window size, whichever - // is smaller. + /* The maximum amount of data allowed is determined by the maximum + packet size for the channel, and the current window size, whichever + is smaller. + + -- http://tools.ietf.org/html/rfc4254#section-5.2 */ $max_size = min( $this->packet_size_client_to_server[$client_channel], $this->window_size_client_to_server[$client_channel] From 78f9fadd3d34c390d732efef5ab7e3e50deda226 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Fri, 19 Jul 2013 10:34:11 -0500 Subject: [PATCH 2/2] SSH2: don't remove first byte from complex logs --- phpseclib/Net/SSH2.php | 1 - 1 file changed, 1 deletion(-) diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index df3c38db..09b0adf6 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -2877,7 +2877,6 @@ class Net_SSH2 { // the most useful log for SSH2 case NET_SSH2_LOG_COMPLEX: $this->message_number_log[] = $message_number; - $this->_string_shift($message); $this->log_size+= strlen($message); $this->message_log[] = $message; while ($this->log_size > NET_SSH2_LOG_MAX_SIZE) {