From 3df39124a85435a07ebff73fe9f445cdbefe3765 Mon Sep 17 00:00:00 2001 From: Mattermost Build Date: Thu, 28 Sep 2023 19:20:19 +0300 Subject: [PATCH] [GH-2857] Allow only macOS to call setSecureKeyboardEntryEnabled (#2860) (#2861) (cherry picked from commit 2a88175b09e46fdae6b680d251825a711a1941f5) Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com> --- 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 27bda6af4a1..0c09f404621 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);