Merge branch 'master' into pkcs18-rewrite

This commit is contained in:
terrafrost 2016-11-17 08:10:55 -06:00
commit 272ae9c64c
4 changed files with 25 additions and 6 deletions

View File

@ -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)

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,
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/)

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

@ -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
*/

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,
"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');