diff --git a/CHANGELOG.md b/CHANGELOG.md index 28e7df16..7d0da1c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## 2.0.4 - 2016-10-03 + +- fix E_DEPRECATED errors on PHP 7.1 (#1041) +- SFTP: speed up downloads (#945) +- SFTP: fix infinite loop when uploading empty file (#995) +- ASN1: fix possible infinite loop in decode (#1027) + ## 2.0.3 - 2016-08-18 - BigInteger/RSA: don't compare openssl versions > 1.0 (#946) @@ -43,6 +50,18 @@ - Classes were renamed and namespaced ([#243](https://github.com/phpseclib/phpseclib/issues/243)) - The use of an autoloader is now required (e.g. Composer) +## 1.0.5 - 2016-10-22 + +- fix issue preventing installation of 1.0.x via Composer (#1048) + +## 1.0.4 - 2016-10-03 + +- fix E_DEPRECATED errors on PHP 7.0 and 7.1 (#1041) +- fix float to int conversions on 32-bit Linux pre-PHP 5.3 (#1038, #1034) +- SFTP: speed up downloads (#945) +- SFTP: fix infinite loop when uploading empty file (#995) +- ASN1: fix possible infinite loop in decode (#1027) + ## 1.0.3 - 2016-08-18 - BigInteger/RSA: don't compare openssl versions > 1.0 (#946) diff --git a/README.md b/README.md index 37ff5c47..564e8127 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ MIT-licensed pure-PHP implementations of an arbitrary-precision integer arithmetic library, fully PKCS#1 (v2.1) compliant RSA, DES, 3DES, RC4, Rijndael, AES, Blowfish, Twofish, SSH-1, SSH-2, SFTP, and X.509 -* [Download (1.0.4)](http://sourceforge.net/projects/phpseclib/files/phpseclib1.0.4.zip/download) +* [Download (1.0.5)](http://sourceforge.net/projects/phpseclib/files/phpseclib1.0.5.zip/download) * [Browse Git](https://github.com/phpseclib/phpseclib) * [Code Coverage Report](http://phpseclib.bantux.org/code_coverage/master/latest/) diff --git a/phpseclib/Net/SCP.php b/phpseclib/Net/SCP.php old mode 100644 new mode 100755 index ece89cf2..db1b2973 --- a/phpseclib/Net/SCP.php +++ b/phpseclib/Net/SCP.php @@ -102,7 +102,7 @@ class SCP * * Connects to an SSH server * - * @param \phpseclib\Net\SSH1|\phpseclin\Net\SSH2 $ssh + * @param \phpseclib\Net\SSH1|\phpseclib\Net\SSH2 $ssh * @return \phpseclib\Net\SCP * @access public */ diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index 181831fa..13349b3d 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -1035,6 +1035,10 @@ class SSH2 } } + $this->identifier = $this->_generate_identifier(); + + fputs($this->fsock, $this->identifier . "\r\n"); + /* According to the SSH2 specs, "The server MAY send other lines of data before sending the version @@ -1095,8 +1099,6 @@ class SSH2 $extra = $matches[1]; - $this->identifier = $this->_generate_identifier(); - if (defined('NET_SSH2_LOGGING')) { $this->_append_log('<-', $matches[0]); $this->_append_log('->', $this->identifier . "\r\n"); @@ -1111,8 +1113,6 @@ class SSH2 throw new \RuntimeException("Cannot connect to SSH $matches[1] servers"); } - fputs($this->fsock, $this->identifier . "\r\n"); - $response = $this->_get_binary_packet(); if ($response === false) { throw new \RuntimeException('Connection closed by server');