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

Consider representing malformed directives #231

bakkot opened this issue Oct 4, 2019 · 1 comment


Copy link

commented Oct 4, 2019

This project is strict about what it accepts, which is generally good. But since people are bad at writing CSPs, they often end up with slightly malformed policies - for example, with a malformed report-uri. If salvation is used as a tool for manipulating those polices, it might be best to leave the malformed parts alone, rather than stripping them out.

This would also provide a measure of future-proofing, so that new directives which have not yet been added to this project don't get dropped.


This comment has been minimized.

Copy link

commented Oct 4, 2019

I could go either way with this. I also see the value in guaranteeing that the library never produces a malformed policy. Maybe we just weaken that to guarantee the policy is not malformed if it was constructed entirely from scratch? So the only way the output would be malformed is through starting out parsing an already malformed policy?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.