This repository has been archived by the owner on Feb 1, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Function("...")
causes unsafe-eval CSP violation in Chrome extension
#336
Comments
Unfortunately, strict mode is enforced in the extension environment. I'm guessing the same is true in other secure sandboxes such as Chrome apps and Atom plugins. |
@deltaidea I think the line can be changed to:
|
Yeah, that works, thank you! Can you guys please take a look and tell if this is a reasonable fix? |
It should be a reasonable fix, |
This is also a problem with firefox extensions |
jvergeldedios
added a commit
to blockhq/regenerator
that referenced
this issue
May 3, 2018
Benjamin-Dobell
added a commit
to Benjamin-Dobell/regenerator
that referenced
this issue
Jun 3, 2018
Benjamin-Dobell
added a commit
to Benjamin-Dobell/regenerator
that referenced
this issue
Jul 23, 2018
10 tasks
benjamn
pushed a commit
to Benjamin-Dobell/regenerator
that referenced
this issue
Aug 3, 2018
benjamn
added a commit
that referenced
this issue
Aug 3, 2018
If this works, then it removes the need for hacks to discover the global object, which continue to be problematic (e.g. #336, #346). Importantly, the regenerator-runtime/runtime.js module can still be evaluated as a non-CJS script, and it will not pollute the global scope except for defining regeneratorRuntime.
benjamn
added a commit
that referenced
this issue
Aug 7, 2018
If this works, then it removes the need for hacks to discover the global object, which continues to be problematic (e.g. #336, #346). Importantly, the regenerator-runtime/runtime.js module can still be evaluated as a non-CJS script, and it will not pollute the global scope except for defining regeneratorRuntime.
This was referenced Nov 16, 2018
This was referenced Jan 12, 2021
Closed
4 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm trying to use react-form in my Chrome extension options page. It has
regenerator-runtime
as the transitive dependency that throws the error, so I figured I'll create an issue here.Thanks for your time! I appreciate your support of the JS community.
Expected Behavior
regenerator-runtime
works silently like a good boy.Actual Behavior
Offending line:
node_modules/regenerator-runtime/runtime-module.js:10
Version:
[email protected]
Full error:
Environment
Chrome extension Options page, Chrome 63.0.3239.132 (64-bit), Windows 10
The text was updated successfully, but these errors were encountered: