CSP style attribute failure error message incorrectly suggests adding a hash value
Reported by
scott.he...@gmail.com,
Apr 13 2016
|
|||||||
Issue descriptionChrome Version : 49.0.2623.112 OS Version: 10.0 URLs (if applicable) : https://scotthelme.co.uk/csp-hash-source-test/ Other browsers tested: none What steps will reproduce the problem? 1. Visit the above URL. 2. The browser blocks an inline style and suggests a hash that matches a hash in the served CSP header. What is the expected result? The inline style should be whitelisted. What happens instead of that? The inline style is blocked. UserAgentString: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36
,
Apr 13 2016
The same also happens in report-only policies: https://scotthelme.co.uk/cspro-hash-source-test/
,
Apr 13 2016
,
Apr 13 2016
Issue also present on Chrome 49.0.2623.112 for OSX 10.11.4
,
Apr 14 2016
,
Apr 14 2016
Able to repro this issue on Windows 7, MAC (10.11.4) & Ubuntu Trusty (14.04) for Google Chrome Stable Version - 50.0.2661.75 This is a Non-Regression issue existing since M30 - # 30.0.1549.0 Screen-recording is attached.
,
Sep 9 2016
I've just stumbled across this bug again and almost raised a new bug as I'd forgotten about this one! Confirmed still happening on Version 53.0.2785.101 m.
,
Sep 9 2016
Sorry that this never made it onto our plate. I'm looking into it now.
,
Sep 9 2016
As pointed out on Twitter, this is because the script is a style attribute, and not actually a style tag. Thus, the blocking is WAI, but indeed the error message is terrible. We should probably adjust the error message for style attributes, since a hash isn't going to help you.
,
Sep 10 2016
I think we could have a few bugs covering the same thing here: https://bugs.chromium.org/p/chromium/issues/detail?id=571234 https://bugs.chromium.org/p/chromium/issues/detail?id=546106
,
Sep 12 2016
At this point, issue 546106 is tracking unsafe-hashed-attributes, so I don't think this is really a dupe of that. However, issue 571234 does seem to be tracking the bad messaging, so I'm going to dupe this to that. |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by scott.he...@gmail.com
, Apr 13 2016126 KB
126 KB View Download