summaryrefslogtreecommitdiffhomepage
path: root/gui/src
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2021-01-28 10:18:54 +0100
committerOskar Nyberg <oskar@mullvad.net>2021-01-28 10:18:54 +0100
commit115099777c1ca93048cf46ef5cfbb253475bc573 (patch)
treef9eb9ba9a282ae24a54b236dfc31cd6565586c56 /gui/src
parent976545b58ed88f93685b903636594b6bf7885577 (diff)
parent595a1d33f709a3927c59aab222670313879161f5 (diff)
downloadmullvadvpn-115099777c1ca93048cf46ef5cfbb253475bc573.tar.xz
mullvadvpn-115099777c1ca93048cf46ef5cfbb253475bc573.zip
Merge branch 'enable-electron-sandbox-on-linux'
Diffstat (limited to 'gui/src')
-rw-r--r--gui/src/main/index.ts13
1 files changed, 8 insertions, 5 deletions
diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts
index f3ac7e72c0..2fe32a0d16 100644
--- a/gui/src/main/index.ts
+++ b/gui/src/main/index.ts
@@ -85,6 +85,8 @@ const AUTO_CONNECT_FALLBACK_DELAY = 6000;
/// Mirrors the beta check regex in the daemon. Matches only well formed beta versions
const IS_BETA = /^(\d{4})\.(\d+)-beta(\d+)$/;
+const SANDBOX_DISABLED = app.commandLine.hasSwitch('no-sandbox');
+
enum AppQuitStage {
unready,
initiated,
@@ -209,10 +211,6 @@ class ApplicationMain {
app.commandLine.appendSwitch('wm-window-animations-disabled');
}
- if (process.platform !== 'linux') {
- app.enableSandbox();
- }
-
this.overrideAppPaths();
if (this.ensureSingleInstance()) {
@@ -221,6 +219,11 @@ class ApplicationMain {
this.initLogging();
+ log.debug(`Chromium sandbox disabled: ${SANDBOX_DISABLED}`);
+ if (!SANDBOX_DISABLED) {
+ app.enableSandbox();
+ }
+
log.info(`Running version ${app.getVersion()}`);
if (process.platform === 'win32') {
@@ -1453,7 +1456,7 @@ class ApplicationMain {
nodeIntegrationInWorker: false,
nodeIntegrationInSubFrames: false,
enableRemoteModule: false,
- sandbox: process.platform !== 'linux',
+ sandbox: !SANDBOX_DISABLED,
contextIsolation: true,
spellcheck: false,
devTools: process.env.NODE_ENV === 'development',