diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2021-03-10 15:54:47 +0100 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2021-03-24 16:42:37 +0100 |
| commit | 8d986a69b0e74b164d80a772d9d41e08104b4a43 (patch) | |
| tree | 36535412fe02fe73c24e2e93bfefc152bf12800a /gui/src | |
| parent | c2cc25249101325dfc196c670b63391b273beaec (diff) | |
| download | mullvadvpn-8d986a69b0e74b164d80a772d9d41e08104b4a43.tar.xz mullvadvpn-8d986a69b0e74b164d80a772d9d41e08104b4a43.zip | |
Automatically deny permission requests
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. |
