Closed Bug 1497742 Opened 6 years ago Closed 3 years ago

CSP with invalid U+00A0 character

Categories

(Core :: DOM: Security, enhancement, P3)

63 Branch
enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1570722
Webcompat Priority revisit
Tracking Status
firefox63 --- affected
firefox64 --- affected

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
Summary: Site won't load. Console shows lots of errors. → CSP with invalid U+00A0 character
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.

Migrating Webcompat whiteboard priorities to project flags. See bug 1547409.

Webcompat Priority: --- → ?

See bug 1547409. Migrating whiteboard priority tags to program flags.

Component: Security → DOM: Security
Whiteboard: [webcompat] → [webcompat][domsecurity-backlog2]

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)

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.

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.