mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-02-10 07:38:48 +00:00
SSH2: no authentication didn't work
This commit is contained in:
parent
af3b0d8c2f
commit
e52697abac
@ -2101,10 +2101,6 @@ class SSH2
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_string($password)) {
|
|
||||||
throw new \UnexpectedValueException('$password needs to either be an instance of \phpseclib\Crypt\Common\PrivateKey, \System\SSH\Agent, an array or a string');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isset($password)) {
|
if (!isset($password)) {
|
||||||
$packet = Strings::packSSH2(
|
$packet = Strings::packSSH2(
|
||||||
'Cs3',
|
'Cs3',
|
||||||
@ -2133,6 +2129,10 @@ class SSH2
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!is_string($password)) {
|
||||||
|
throw new \UnexpectedValueException('$password needs to either be an instance of \phpseclib\Crypt\Common\PrivateKey, \System\SSH\Agent, an array or a string');
|
||||||
|
}
|
||||||
|
|
||||||
$packet = Strings::packSSH2(
|
$packet = Strings::packSSH2(
|
||||||
'Cs3bs',
|
'Cs3bs',
|
||||||
NET_SSH2_MSG_USERAUTH_REQUEST,
|
NET_SSH2_MSG_USERAUTH_REQUEST,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user