mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 09:13:33 +00:00
[PM-14993] Add ssh-agent error handling and security fixes (#12048)
* Add error handling and security fixes * Add is running status, and add more errors on windows
This commit is contained in:
@@ -79,7 +79,7 @@ export class MainSshAgentService {
|
||||
ipcMain.handle(
|
||||
"sshagent.setkeys",
|
||||
async (event: any, keys: { name: string; privateKey: string; cipherId: string }[]) => {
|
||||
if (this.agentState != null) {
|
||||
if (this.agentState != null && (await sshagent.isRunning(this.agentState))) {
|
||||
sshagent.setKeys(this.agentState, keys);
|
||||
}
|
||||
},
|
||||
@@ -107,7 +107,7 @@ export class MainSshAgentService {
|
||||
);
|
||||
|
||||
ipcMain.handle("sshagent.lock", async (event: any) => {
|
||||
if (this.agentState != null) {
|
||||
if (this.agentState != null && (await sshagent.isRunning(this.agentState))) {
|
||||
sshagent.lock(this.agentState);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user