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

Don't open external links in the Electron context #35

Merged
merged 2 commits into from Mar 15, 2018

Conversation

lukechilds
Copy link

@lukechilds lukechilds commented Mar 15, 2018

If external links are opened in the Electron context, any JavaScript running on those sites can access the main Node.js process and will get remote code execution on the users OS.

@pbca26
Copy link

pbca26 commented Mar 15, 2018

perhaps window.require('electron') ?
direct import doesn't work w/o any extra hacks afaik

@lukechilds
Copy link
Author

lukechilds commented Mar 15, 2018

import should work but it might depend on how your build process is configured. Updated to window.require('electron') for consistency with your original code.

@pbca26 pbca26 merged commit 9dd708e into KomodoPlatform:master Mar 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants