-
Notifications
You must be signed in to change notification settings - Fork 149
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
CSP2: Default value of default-src is incorrect #514
Comments
Note that this appears to be fixed in CSP3, as near as I can tell. |
Yup. This is broken in CSP2. Although I think that we decided in some other bug that it didn't matter because CSP2 was so loosely specified that the |
w3c/webappsec-csp#9 (comment) is what I was thinking of. @hillbrad, @wseltzer, @dveditz: Is it worth revising CSP2 at this point? WDYT? |
Well, I'm fine with this being loosely specified as well, just as long as it's clear that the two hand-wavingly vague definitions are distinct. The browsers treat them very differently, and so this line was very confusing to me both when it came to writing documentation about CSP as well as when writing a CSP analyzer. |
Do you mean that browsers treat a missing |
The latter. Not having a default-src is very different than default-src *, but the CSP2 spec implies that they are the same. |
So, by "fixed in CSP3" does that mean we expect different behavior from the I think we can maybe punt on updating CSP2 if we verify by the test suite On Mon, Apr 18, 2016 at 2:22 PM April King [email protected] wrote:
|
The behavior hasn't changed in CSP3, it's just that the CSP3 accurately describes the implemented behavior where as CSP2 does not. |
Test shows that Chrome, Firefox and Safari Tech Preview are all compliant, so we can try to make this correction as a non-conformance affecting edit. (I'll manage that, @mikewest ) |
You are the best, @hillbrad. Thank you! |
This addresses w3c/webappsec#514 in the editor's draft. @hillbrad will work out what that means for the CR->PR->REC transitions.
Fixed this in the editor's draft, using @marumari's suggestion. Brad, perhaps you could sneakily apply w3c/webappsec-csp@bc9577d to the CR? (Let's leave this bug open until that's addressed) |
This addresses w3c/webappsec#514 in the editor's draft. @hillbrad will work out what that means for the CR->PR->REC transitions.
Here is what the current specification says:
Which is incorrect, as it reads that these two statements are equivalent:
Content-Security-Policy: default-src *; upgrade-insecure-requests
Content-Security-Policy: upgrade-insecure-requests
The statement should probably read something like:
(cc: @hillbrad, as @mikewest told me to)
The text was updated successfully, but these errors were encountered: