diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a0ea3fc..7d0da1c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,10 @@ - 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) 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 c889e6ab..f0b517b5 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');