From fd2b782b1980c68d129bb7dea85d383ee050acae Mon Sep 17 00:00:00 2001 From: "buf0-bot[bot]" <252831055+buf0-bot[bot]@users.noreply.github.com> Date: Tue, 19 May 2026 11:09:33 -0700 Subject: [PATCH] fix: pr-bug-scan validated finding from #2274 (#2296) Co-authored-by: orca-bug-scan-bot --- src/main/ipc/ssh.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/ipc/ssh.ts b/src/main/ipc/ssh.ts index a216eff558d..43e40ffd586 100644 --- a/src/main/ipc/ssh.ts +++ b/src/main/ipc/ssh.ts @@ -730,6 +730,10 @@ export function registerSshHandlers( clearProviderPtyState(ptyId) deletePtyOwnership(ptyId) } + // Why: reset's connect() can trip onCredentialRequest, which adds to + // credentialRequestedForTarget. Without this delete, a later doConnect + // that doesn't prompt would still persist lastRequiredPassphrase=true. + credentialRequestedForTarget.delete(targetId) await connectionManager!.disconnect(targetId) } }