-
Notifications
You must be signed in to change notification settings - Fork 101
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
Issues with Content Security Policy #166
Comments
@crcn Any thoughts? |
@crcn the simplest way to support this from your side is to provide CSP compliant version as a separate bundle e.g. Update: This version of bundle won't support |
I can send a PR for this, otherwise I would be forced to publish a forked version... |
great idea 👍. If you want to submit a PR I'd be happy to merge it in. |
However, what are your thoughts around removing the eval code? That would obviously require a |
You don’t need a major version bump. You will have just an additional file. So eventually there will be 2 files: sift.js and sift.csp.js People will be able to use whatever file fits their needs. The plan is to add
Uglifier can optimize this |
Are you ok to replace webpack with rollup? because I see that you started to integrate it :) |
No worries I will use webpack :) |
Done, now there is a new
in order to use CSP compliant version, for the rest of the world everything remains the same, so this is a minor version update |
Thanks @stalniy! Published to NPM as |
I missed one important thing... Webpack uses |
please check #170 |
We are using CASL for our project to check permissions.
recently we encountered that there are some issues with CSP in our application.
Going further, we found that it is because of sift.js which has something like following in javascsript...
return"string"==typeof e?new Function("obj","return "+e)
CASL uses "sift" for Mongo DB like filters in javascript.
I tried to go through CASL documentation, but found nothing related to CSP or Security.
Has anybody got this issue before? Is it possible to fix this without adding "unsafe-eval"
following is the code snippet from stif.js which causes problem
The text was updated successfully, but these errors were encountered: