mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 01:03:35 +00:00
[PM-14988] Use peercred / GetNamedPipeClientProcessId to gather info about process connecting to ssh agent (#12065)
* Fix double prompt when unlocking by ssh request * Add peercred for unix * Enable apple-app-store feature * Add generic parameter * Update * Add procinfo for windows * Show connecting app in ui * Use struct instead of tuple * Use atomics instead of mutex * Fix windows build * Use is_running function * Cleanup named pipe listener * Cleanups * Cargo fmt * Replace "" with none * Rebuild index.d.ts * Fix is running check
This commit is contained in:
@@ -29,7 +29,7 @@ export class MainSshAgentService {
|
||||
init() {
|
||||
// handle sign request passing to UI
|
||||
sshagent
|
||||
.serve(async (err: Error, cipherId: string, isListRequest: boolean) => {
|
||||
.serve(async (err: Error, cipherId: string, isListRequest: boolean, processName: string) => {
|
||||
// clear all old (> SIGN_TIMEOUT) requests
|
||||
this.requestResponses = this.requestResponses.filter(
|
||||
(response) => response.timestamp > new Date(Date.now() - this.SIGN_TIMEOUT),
|
||||
@@ -41,6 +41,7 @@ export class MainSshAgentService {
|
||||
cipherId,
|
||||
isListRequest,
|
||||
requestId: id_for_this_request,
|
||||
processName,
|
||||
});
|
||||
|
||||
const result = await firstValueFrom(
|
||||
|
||||
@@ -122,6 +122,10 @@ export class SshAgentService implements OnDestroy {
|
||||
const cipherId = message.cipherId as string;
|
||||
const isListRequest = message.isListRequest as boolean;
|
||||
const requestId = message.requestId as number;
|
||||
let application = message.processName as string;
|
||||
if (application == "") {
|
||||
application = this.i18nService.t("unknownApplication");
|
||||
}
|
||||
|
||||
if (isListRequest) {
|
||||
const sshCiphers = ciphers.filter(
|
||||
@@ -151,7 +155,7 @@ export class SshAgentService implements OnDestroy {
|
||||
const dialogRef = ApproveSshRequestComponent.open(
|
||||
this.dialogService,
|
||||
cipher.name,
|
||||
this.i18nService.t("unknownApplication"),
|
||||
application,
|
||||
);
|
||||
|
||||
const result = await firstValueFrom(dialogRef.closed);
|
||||
|
||||
Reference in New Issue
Block a user