Skip to content

Commit

Permalink
SSH2: don't try to login as none auth method for CoreFTP server
Browse files Browse the repository at this point in the history
  • Loading branch information
terrafrost committed Jul 31, 2020
1 parent ea653e1 commit c7d7b36
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions phpseclib/Net/SSH2.php
Expand Up @@ -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);
}
Expand Down

1 comment on commit c7d7b36

@terrafrost
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #1488

Please sign in to comment.