Skip to content
This repository has been archived by the owner on Dec 21, 2024. It is now read-only.

__electronHot__ injection causes SyntaxError if absolute path contains ' #14

Open
Martin-Pitt opened this issue Jun 1, 2017 · 1 comment

Comments

@Martin-Pitt
Copy link

Was getting blank windows when I noticed via DevTools I was getting a SyntaxError: missing ) after argument list, this is because my project folder has a ' in the absolute path.

In fact, this seems like a possible XSS attack vector if the folders are named specifically. (E.g. escaping string quoting via the path)

Please escape the absolute path when injecting var __electronHot__ = require(…); with the path

@geowarin
Copy link
Owner

geowarin commented Jun 1, 2017

Hello @Martin-Pitt.
Thanks for the feedback!

You should not enable electron-hot in production, so I don't really think there is an XSS risk here.

That being said, I would love to fix this problem.
Would you be able to send a PR?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants