Closed
Bug 1497742
Opened 6 years ago
Closed 3 years ago
CSP with invalid U+00A0 character
Categories
(Core :: DOM: Security, enhancement, P3)
Tracking
()
RESOLVED
DUPLICATE
of bug 1570722
Webcompat Priority | revisit |
People
(Reporter: karlcow, Unassigned)
References
(Blocks 1 open bug, )
Details
(Whiteboard: [webcompat][domsecurity-backlog2])
This is a spin off of https://webcompat.com/issues/18902
not sure if it should be opened in Security or in HTTP component.
The site has been fixed.
https://www.cpf.gov.sg/members
The issue was that the site was using an invalid character U+00A0 (no-break space) in the Content-Security-Policy header.
Content-Security-Policy: script-src 'self' 'unsafe-inline' 'unsafe-eval' __www.adobetag.com assets.adobedtm.com https://www.google-analytics.com https://www.google.com/recaptcha/ https://www.gstatic.com/recaptcha/; style-src 'self' 'unsafe-inline'
Tests have been added to web-platform-tests
https://github.com/web-platform-tests/wpt/pull/13228
Chrome is passing the tests
Firefox fails two of them.
See the thoughts in https://webcompat.com/issues/18902#issuecomment-425481513
Reporter | ||
Updated•6 years ago
|
Summary: Site won't load. Console shows lots of errors. → CSP with invalid U+00A0 character
Comment 1•6 years ago
|
||
Currently there is an open spec issue that might affect work on this bug: https://github.com/w3c/webappsec-csp/issues/6.
I see two possibilities as to why the test fails on Firefox:
1) Firefox does treat U+00A0 as a valid space and therefore treats the policy as valid. In this case this should be fixed as it's orthogonal to the spec issue above.
2) Firefox does not parse the policy because of the invalid space but falls back on some sort of default policy (for example `default-src 'self'`, or something like that). In this case we should hold off on fixing this as it is possible that after the spec issue is fixed it might actually align with current Firefox behavior.
Comment 2•6 years ago
|
||
The tests that Andy added have results shown here:
https://wpt.fyi/results/content-security-policy/generic/only-valid-whitespaces-are-allowed.html?label=experimental
Comment 3•6 years ago
|
||
Migrating Webcompat whiteboard priorities to project flags. See bug 1547409.
Webcompat Priority: --- → ?
Comment 4•6 years ago
|
||
See bug 1547409. Migrating whiteboard priority tags to program flags.
Updated•5 years ago
|
Webcompat Priority: ? → revisit
Component: Security → DOM: Security
Updated•5 years ago
|
Whiteboard: [webcompat] → [webcompat][domsecurity-backlog2]
Comment 5•3 years ago
|
||
Christoph, can you fine someone to take a look at https://github.com/webcompat/web-bugs/issues/91425? The question is if this is the same issue as this one.
Flags: needinfo?(ckerschb)
Comment 6•3 years ago
|
||
Ah, see also https://bugzilla.mozilla.org/show_bug.cgi?id=1570722, which I had forgotten about. Maybe they're all related enough that we can dupe something here.
Comment 7•3 years ago
|
||
This Bug is in fact a duplicate of Bug 1570722, and we should adjust our CSP Parser within Bug 1570722 accordingly.
Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(ckerschb)
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•