From c301ddf38f0fbc9991b72aff898829a313b37c72 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Sat, 4 Apr 2020 12:47:30 -0500 Subject: [PATCH 1/3] SFTP: make it so extending SFTP class doesn't cause a segfault --- phpseclib/Net/SFTP.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/phpseclib/Net/SFTP.php b/phpseclib/Net/SFTP.php index a118d45e..e39fabed 100644 --- a/phpseclib/Net/SFTP.php +++ b/phpseclib/Net/SFTP.php @@ -467,7 +467,11 @@ class Net_SFTP extends Net_SSH2 */ function login($username) { - if (!call_user_func_array(array(&$this, 'parent::login'), func_get_args())) { + $args = func_get_args(); + $callback = version_compare(PHP_VERSION, '5.3.0') < 0 ? + array(&$this, 'parent::login') : + 'parent::login'; + if (!call_user_func_array($callback, $args)) { return false; } From 9c0ad2f1f41bec579a1b3051c1ae14152ee1a86a Mon Sep 17 00:00:00 2001 From: terrafrost Date: Sat, 4 Apr 2020 12:49:56 -0500 Subject: [PATCH 2/3] SFTP: optimize call to parent login method for 2.0 branch --- phpseclib/Net/SFTP.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/phpseclib/Net/SFTP.php b/phpseclib/Net/SFTP.php index 6b826ec3..bf7ef36b 100644 --- a/phpseclib/Net/SFTP.php +++ b/phpseclib/Net/SFTP.php @@ -412,11 +412,7 @@ class SFTP extends SSH2 */ function login($username) { - $args = func_get_args(); - $callback = version_compare(PHP_VERSION, '5.3.0') < 0 ? - array(&$this, 'parent::login') : - 'parent::login'; - if (!call_user_func_array($callback, $args)) { + if (!call_user_func_array('parent::login', func_get_args())) { return false; } From 34620af4df7d1988d8f0d7e91f6c8a3bf931d8dc Mon Sep 17 00:00:00 2001 From: terrafrost Date: Sat, 4 Apr 2020 18:17:33 -0500 Subject: [PATCH 3/3] CHANGELOG: add entries for 2.0.25 and 2.0.26 release notes --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8874fea..947ad115 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## 2.0.26 - 2020-03-22 + +- SFTP: another attempt at speeding up uploads (#1455) +- SSH2: try logging in with none as an auth method first (#1454) +- ASN1: fix for malformed ASN1 strings (#1456) + +## 2.0.25 - 2020-02-25 + +- SFTP: re-add buffering (#1455) + ## 2.0.24 - 2020-02-22 - X509: fix PHP 5.3 compatability issue