[MM-54463] Enforce secure keyboard entry on macOS when a password box is focused (#2829)

* [MM-54463] Enforce secure keyboard entry on macOS when a password box is focused

* PR feedback
This commit is contained in:
Devin Binnie
2023-09-15 10:24:19 -04:00
committed by GitHub
parent 88e1fea4e7
commit d5f5c4849a
4 changed files with 26 additions and 0 deletions

View File

@@ -147,3 +147,9 @@ export function handlePingDomain(event: IpcMainInvokeEvent, url: string): Promis
throw new Error('Could not find server ' + url);
});
}
export function handleToggleSecureInput(event: IpcMainEvent, secureInput: boolean) {
// Enforce macOS to restrict processes from reading the keyboard input when in a password field
log.debug('handleToggleSecureInput', secureInput);
app.setSecureKeyboardEntryEnabled(secureInput);
}