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

Block unsafe-eval permanent on all sites #21

Open
Celuni opened this issue May 17, 2019 · 2 comments
Open

Block unsafe-eval permanent on all sites #21

Celuni opened this issue May 17, 2019 · 2 comments

Comments

@Celuni
Copy link

Celuni commented May 17, 2019

Hello,

I really like your addon so far, I've looked around for ages to permanently block eval() and your addon is the solution, like I don't care if I break websites I just don't want their nasty packed scripts.

Is it possible to add a checkbox that will filter out the unsafe-eval every time I visit the website, maybe even on any website?

@april
Copy link
Owner

april commented May 18, 2019

Would an "apply to all sites" button work for you?

@Celuni
Copy link
Author

Celuni commented May 18, 2019

Yes, please just force no eval.

I've looked in your code and tried to find out more about it, I think what we need to do is one checkbox that toggles to record all websites in customcspRecords (not if only I click on shown.bs.modal, Globally!),
then on line 320 in background.js extend the if statement with our new checkbox, filter unsafe-eval out and send the header.

I'm missing knowledge about how this all works.. sorry.
What I managed to do is before line 164 a return if 'unsafe-eval', it filters it out only for the copy to clipboard thing, but this means I have to first visit the page, enable csp recording, load a second time, and now I change csp, and most likely load the page again since I've read something about when the tag was executed we can't change the headers anymore.

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

No branches or pull requests

2 participants