diff options
Diffstat (limited to 'gui/src')
| -rw-r--r-- | gui/src/main/index.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts index 5d08689036..3d51c51217 100644 --- a/gui/src/main/index.ts +++ b/gui/src/main/index.ts @@ -385,6 +385,7 @@ class ApplicationMain { // fetching. https://github.com/electron/electron/issues/22995 session.defaultSession.setSpellCheckerDictionaryDownloadURL('https://00.00/'); + this.blockPermissionRequests(); this.blockRequests(); this.translations = this.updateCurrentLocale(); @@ -1399,6 +1400,13 @@ class ApplicationMain { }; } + private blockPermissionRequests() { + session.defaultSession.setPermissionRequestHandler((_webContents, _permission, callback) => { + callback(false); + }); + session.defaultSession.setPermissionCheckHandler(() => false); + } + // Since the app frontend never performs any network requests, all requests originating from the // renderer process are blocked to protect against the potential threat of malicious third party // dependencies. There are a few exceptions which are described further down. |
