[CSP] HTML imports cannot be whitelisted with a script nonce |
||||
Issue descriptionChrome Version : 51.0.2704.106 URLs (if applicable) : http://lingro.com:81/cgi-bin/csp-import-nonce.py What steps will reproduce the problem? (1) Use a CSP policy with a script-src nonce (2) Try to load an HTML import with a nonce (<link nonce=foo rel=import>) What is the expected result? The HTML import should be allow if the <link> element has a valid nonce. What happens instead? CSP violation: Refused to load the script '...' because it violates the following Content Security Policy directive: "script-src 'nonce-foo'"
,
Jul 13 2016
,
Jul 14 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/dd6fbccfc7457596f386d41b822d9e93a22b4cac commit dd6fbccfc7457596f386d41b822d9e93a22b4cac Author: mkwst <mkwst@chromium.org> Date: Thu Jul 14 09:20:42 2016 Teach 'LinkRequestBuilder' about the 'nonce' attribute. Rather than special-casing stylesheet loading, this patch teaches 'LinkRequestBuilder' to grab the nonce when creating requests associated with '<link>' elements. This ensures that we deal correctly with stylesheet and HTML imports. The import tests added in 'http/tests/security/contentSecurityPolicy/nonces/' verify the expected behavior: a CSP containing "script-src 'nonce-abc'" should allow '<link rel="import" nonce="abc" href="...">'. BUG= 627762 R=jochen@chromium.org Review-Url: https://codereview.chromium.org/2147853003 Cr-Commit-Position: refs/heads/master@{#405454} [add] https://crrev.com/dd6fbccfc7457596f386d41b822d9e93a22b4cac/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/nonces/import-enforce-allowed.php [add] https://crrev.com/dd6fbccfc7457596f386d41b822d9e93a22b4cac/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/nonces/import-enforce-blocked.php [add] https://crrev.com/dd6fbccfc7457596f386d41b822d9e93a22b4cac/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/nonces/import-multiple-allowed.php [add] https://crrev.com/dd6fbccfc7457596f386d41b822d9e93a22b4cac/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/nonces/import-multiple-blocked.php [add] https://crrev.com/dd6fbccfc7457596f386d41b822d9e93a22b4cac/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/nonces/import-reportonly-allowed.php [modify] https://crrev.com/dd6fbccfc7457596f386d41b822d9e93a22b4cac/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp [modify] https://crrev.com/dd6fbccfc7457596f386d41b822d9e93a22b4cac/third_party/WebKit/Source/core/html/LinkResource.cpp
,
Oct 13 2016
Issue 655682 has been merged into this issue.
,
Feb 23 2017
,
Feb 23 2017
Issue 654557 has been merged into this issue.
,
Mar 27 2017
|
||||
►
Sign in to add a comment |
||||
Comment 1 by mkwst@chromium.org
, Jul 13 2016Status: Started (was: Unconfirmed)