mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-28 12:10:59 +00:00
SSH2: make login() return false if no valid auth methods are found
this is an issue if you, for example, login with a PublicKey instead of a PrivateKey
This commit is contained in:
parent
e0068833b5
commit
a74707e080
@ -2314,6 +2314,10 @@ class Net_SSH2
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!count($newargs)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($newargs as $arg) {
|
foreach ($newargs as $arg) {
|
||||||
if ($this->_login_helper($username, $arg)) {
|
if ($this->_login_helper($username, $arg)) {
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user