Skip to content

Commit

Permalink
[mattermostGH-2857] Allow only macOS to call setSecureKeyboardEntryEn…
Browse files Browse the repository at this point in the history
…abled (mattermost#2860) (mattermost#2861)

(cherry picked from commit 2a88175)

Co-authored-by: Devin Binnie <[email protected]>
  • Loading branch information
mattermost-build and devinbinnie committed Sep 28, 2023
1 parent e4d05b5 commit 3df3912
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/app/intercom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3df3912

Please sign in to comment.