Agent: reset supported_private_key_algorithms for every key

This commit is contained in:
Jakub Trmota 2024-05-07 23:45:11 +02:00 committed by terrafrost
parent cd4d0ba47c
commit 3b0fb1c05f

View File

@ -2799,10 +2799,12 @@ class Net_SSH2
{
$this->agent = $agent;
$keys = $agent->requestIdentities();
$orig_algorithms = $this->supported_private_key_algorithms;
foreach ($keys as $key) {
if ($this->_privatekey_login($username, $key)) {
return true;
}
$this->supported_private_key_algorithms = $orig_algorithms;
}
return false;