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

fix(patches): enable electron sandbox #1530

Merged
merged 6 commits into from
May 28, 2023
Merged

Conversation

rxri
Copy link
Contributor

@rxri rxri commented May 27, 2023

The electron sandbox disables the node integration within the renderer process. However, the custom-gallery patch required the use of the require() function, causing the renderer to fail loading within the sandbox. To resolve this issue, the function that requires user's product.json has been moved to main.js, and the user's product.json is now assigned to global scope which can be used in product.ts.

Fixes #1482
This patch works on stable (1.78.2) and insider (1.79.0) versions

@daiyam daiyam changed the base branch from master to insider May 28, 2023 21:49
@daiyam daiyam merged commit a2aed6a into VSCodium:insider May 28, 2023
6 checks passed
@daiyam
Copy link
Member

daiyam commented May 28, 2023

@rxri Thanks a lot

@daiyam
Copy link
Member

daiyam commented May 28, 2023

The issue with git apply was due to merge-user-product.patch being a bit corrupted (the space were missing, mostly due to the setting Files: Trim Trailing Whitespace enabled).
To avoid that issue, in .editorconfig, the behaviour has been disabled for those files. (EditorConfig for VS Code needs to be installed)

@rxri rxri deleted the fix/sandbox branch May 28, 2023 22:34
rxri added a commit to rxri/vscodium-insider that referenced this pull request May 29, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Electron sandboxing prevents basic functionality.
2 participants