-
Notifications
You must be signed in to change notification settings - Fork 27
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
Validator fails to merge policies with report-uri #228
Comments
There's no way to create a single CSP policy which does what those two do in combination, because there's no way to make a single policy which will use a report-uri for only a subset of its directives. So it can't merge those two policies. Are you entering those headers manually, or is there a website that has both which you're trying to run through the "Validate CSP in headers and meta elements" box? If the latter, I'd consider that a bug in cspvalidator.org, I think. |
This happens both when I enter a site with multiple headers (www.maxmind.com) and when I enter the values manually. I am not sure what the goal of the manual entry is, but the two header values could be merged into one by separating them with a comma. From the v2 spec:
|
Related, I believe the merging is incorrect when you enter something like |
The main purpose of the manual entry (of merging, really) is to allow updating policies: for example, say you have an existing policy and you want to ensure scripts hosted on Anyway, yes, Salvation should probably be updated to support comma-separated lists of policies, and to support merging two policies with distinct
Unfortunately there's no way to represent that as a single policy either, though the fact that it produces an incorrect policy instead of an error is a bug. |
There is a down arrow next to the
Update: you are right, that's a wrong output. |
The validator fails to handle this policy taken directly from the CSP 2 specification:
It says "Cannot merge policies if either policy contains a report-uri directive."
See mozilla/http-observatory#396 also.
Thoughts?
The text was updated successfully, but these errors were encountered: