From c7d7b36018e13d034a74f2416ce1dcd247bda3ec Mon Sep 17 00:00:00 2001 From: terrafrost Date: Fri, 31 Jul 2020 02:49:21 -0500 Subject: [PATCH] SSH2: don't try to login as none auth method for CoreFTP server --- phpseclib/Net/SSH2.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index 31af44534..aa503a1bb 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -2135,11 +2135,13 @@ function login($username) // try logging with 'none' as an authentication method first since that's what // PuTTY does - if ($this->_login($username)) { - return true; - } - if (count($args) == 1) { - return false; + if (substr($this->server_identifier, 0, 13) != 'SSH-2.0-CoreFTP') { + if ($this->_login($username)) { + return true; + } + if (count($args) == 1) { + return false; + } } return call_user_func_array(array(&$this, '_login'), $args); }