Skip to content

Commit

Permalink
Agent: reset supported_private_key_algorithms for every key
Browse files Browse the repository at this point in the history
  • Loading branch information
forrest79 authored and terrafrost committed May 11, 2024
1 parent cd4d0ba commit 3b0fb1c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions phpseclib/Net/SSH2.php
Original file line number Diff line number Diff line change
Expand Up @@ -2799,10 +2799,12 @@ function _ssh_agent_login($username, $agent)
{
$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;
Expand Down

1 comment on commit 3b0fb1c

@terrafrost
Copy link
Member

Choose a reason for hiding this comment

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

See #1995

Please sign in to comment.