1
0
mirror of https://github.com/danog/phpseclib.git synced 2024-11-26 20:35:21 +01:00

Merge branch '2.0'

This commit is contained in:
terrafrost 2016-11-08 09:23:53 -06:00
commit 2d2bf2990e
4 changed files with 10 additions and 6 deletions

View File

@ -50,6 +50,10 @@
- Classes were renamed and namespaced ([#243](https://github.com/phpseclib/phpseclib/issues/243)) - Classes were renamed and namespaced ([#243](https://github.com/phpseclib/phpseclib/issues/243))
- The use of an autoloader is now required (e.g. Composer) - 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 ## 1.0.4 - 2016-10-03
- fix E_DEPRECATED errors on PHP 7.0 and 7.1 (#1041) - fix E_DEPRECATED errors on PHP 7.0 and 7.1 (#1041)

View File

@ -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, arithmetic library, fully PKCS#1 (v2.1) compliant RSA, DES, 3DES, RC4, Rijndael,
AES, Blowfish, Twofish, SSH-1, SSH-2, SFTP, and X.509 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) * [Browse Git](https://github.com/phpseclib/phpseclib)
* [Code Coverage Report](http://phpseclib.bantux.org/code_coverage/master/latest/) * [Code Coverage Report](http://phpseclib.bantux.org/code_coverage/master/latest/)

2
phpseclib/Net/SCP.php Normal file → Executable file
View File

@ -102,7 +102,7 @@ class SCP
* *
* Connects to an SSH server * 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 * @return \phpseclib\Net\SCP
* @access public * @access public
*/ */

View File

@ -1035,6 +1035,10 @@ class SSH2
} }
} }
$this->identifier = $this->_generate_identifier();
fputs($this->fsock, $this->identifier . "\r\n");
/* According to the SSH2 specs, /* According to the SSH2 specs,
"The server MAY send other lines of data before sending the version "The server MAY send other lines of data before sending the version
@ -1095,8 +1099,6 @@ class SSH2
$extra = $matches[1]; $extra = $matches[1];
$this->identifier = $this->_generate_identifier();
if (defined('NET_SSH2_LOGGING')) { if (defined('NET_SSH2_LOGGING')) {
$this->_append_log('<-', $matches[0]); $this->_append_log('<-', $matches[0]);
$this->_append_log('->', $this->identifier . "\r\n"); $this->_append_log('->', $this->identifier . "\r\n");
@ -1111,8 +1113,6 @@ class SSH2
throw new \RuntimeException("Cannot connect to SSH $matches[1] servers"); throw new \RuntimeException("Cannot connect to SSH $matches[1] servers");
} }
fputs($this->fsock, $this->identifier . "\r\n");
$response = $this->_get_binary_packet(); $response = $this->_get_binary_packet();
if ($response === false) { if ($response === false) {
throw new \RuntimeException('Connection closed by server'); throw new \RuntimeException('Connection closed by server');