From 2a88175b09e46fdae6b680d251825a711a1941f5 Mon Sep 17 00:00:00 2001 From: Devin Binnie <52460000+devinbinnie@users.noreply.github.com> Date: Thu, 28 Sep 2023 11:07:58 -0400 Subject: [PATCH] [GH-2857] Allow only macOS to call setSecureKeyboardEntryEnabled (#2860) --- src/main/app/intercom.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/app/intercom.ts b/src/main/app/intercom.ts index 27bda6af..0c09f404 100644 --- a/src/main/app/intercom.ts +++ b/src/main/app/intercom.ts @@ -149,6 +149,10 @@ export function handlePingDomain(event: IpcMainInvokeEvent, url: string): Promis } export function handleToggleSecureInput(event: IpcMainEvent, secureInput: boolean) { + if (process.platform !== 'darwin') { + return; + } + // Enforce macOS to restrict processes from reading the keyboard input when in a password field log.debug('handleToggleSecureInput', secureInput); app.setSecureKeyboardEntryEnabled(secureInput);