Skip to content
This repository has been archived by the owner on Feb 1, 2025. It is now read-only.

Fix unsafe-eval CSP violation - closes #336 #346

Merged
merged 2 commits into from
Aug 3, 2018

Conversation

Benjamin-Dobell
Copy link
Contributor

Refer to #336 for details.

@Benjamin-Dobell
Copy link
Contributor Author

Benjamin-Dobell commented Jul 23, 2018

I think there's something slightly wrong with the Travis CI setup for this project. I just rebased on master in hope of getting the all clear, but all NPM versions failed in the same fashion, running bootstrap.

I can recreate, and remedy, this locally from a fresh clone. Specifically, the issue seems to be that we need to install the node_modules of the packages/. The following gist demonstrates the problem and solution:

https://gist.githubusercontent.com/Benjamin-Dobell/cf86ce36fe8bf6ddfa06ada47725e44b/raw/6841c94b9758ed973ccced72102a9835cfc764ca/gistfile1.txt

Nonetheless, I'd appreciate it if this PR could be reviewed & merged 😄

@torarvid
Copy link

torarvid commented Aug 2, 2018

At my office, we have been waiting for this PR to be merged for over a month. I’m thinking we have to fork the project soon to have this CSP issue fixed, which seems like a shame..

benjamn added a commit to Benjamin-Dobell/regenerator that referenced this pull request Aug 2, 2018
@JakeChampion
Copy link

benjamn added a commit that referenced this pull request Aug 2, 2018
benjamn added a commit that referenced this pull request Aug 2, 2018
@benjamn benjamn merged commit 4efc689 into facebook:master Aug 3, 2018
benjamn added a commit that referenced this pull request 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
Copy link
Contributor

benjamn commented Aug 3, 2018

These changes have been published as regenerator-runtime@0.12.1, though I would also request your 👀 on #353, which attempts to remove the need for hacks to discover the global object.

benjamn added a commit that referenced this pull request 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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants