Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defaulting sandboxing to false #13045

Merged
merged 3 commits into from
Dec 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions desktop/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,12 @@ const mainWindow = (() => {
app.setName('New Expensify');
}

/*
* Starting from Electron 20, it shall be required to set sandbox option to false explicitly.
* Running a preload script contextBridge.js require access to nodeJS modules from the javascript code.
* This was not a concern earlier as sandbox used to be false by default for Electron <= 20.
* Refer https://www.electronjs.org/docs/latest/tutorial/sandbox#disabling-the-sandbox-for-a-single-process
* */
smrutiparida marked this conversation as resolved.
Show resolved Hide resolved
return app.whenReady()
.then(() => {
const browserWindow = new BrowserWindow({
Expand All @@ -205,6 +211,7 @@ const mainWindow = (() => {
webPreferences: {
preload: `${__dirname}/contextBridge.js`,
contextIsolation: true,
sandbox: false,
smrutiparida marked this conversation as resolved.
Show resolved Hide resolved
},
titleBarStyle: 'hidden',
});
Expand Down