From 23f117e32b09ff3c9c1c049f991604014de7c68a Mon Sep 17 00:00:00 2001 From: terrafrost Date: Mon, 18 Dec 2023 22:54:09 -0600 Subject: [PATCH] SSH2: only capture login info once --- phpseclib/Net/SSH2.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index 307d6e5e..769177bc 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -2278,7 +2278,9 @@ class Net_SSH2 function login($username) { $args = func_get_args(); - $this->auth[] = $args; + if (!$this->retry_connect) { + $this->auth[] = $args; + } // try logging with 'none' as an authentication method first since that's what // PuTTY does