Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Issue 2472333003: CSP: "local schemes" should inherit policy when embedded. (Closed)

Created:
4 years, 1 month ago by Mike West
Modified:
4 years ago
CC:
blink-reviews, blink-reviews-dom_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

CSP: "local schemes" should inherit policy when embedded. https://w3c.github.io/webappsec-csp/#initialize-document-csp mandates that resources with "local schemes" ('data:', 'blob:', 'filesystem:', 'about:') inherit the policy of their embedding context when pulled in via an '<iframe>'. I'm pretty sure this worked at some point in the past, but I apparently didn't put a test on it. It does work in Firefox. Let's match their behavior and lock it in. BUG=513860 R=jochen@chromium.org, dcheng@chromium.org Committed: https://crrev.com/e82aced182b4fe7ac99437943a7c39238796c1d9 Cr-Commit-Position: refs/heads/master@{#435165}

Patch Set 1 #

Total comments: 4

Patch Set 2 : feedback #

Patch Set 3 : browser_test #

Total comments: 4

Patch Set 4 : dcheng@ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+285 lines, -22 lines) Patch
M chrome/browser/devtools/devtools_sanity_browsertest.cc View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/webrequest/manifest.json View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/webrequest/test_types.js View 1 2 2 chunks +4 lines, -7 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/cascade/cross-origin.html View 1 chunk +36 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/cascade/cross-origin-with-own-policy.html View 1 chunk +38 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/cascade/same-origin.html View 1 chunk +73 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/cascade/same-origin-with-own-policy.html View 1 chunk +82 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/object-src-does-not-affect-child.html View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/resources/cascade-helper.js View 1 chunk +34 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 2 3 2 chunks +9 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/core/loader/DocumentLoader.cpp View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 35 (23 generated)
Mike West
WDYT, Jochen? This time I'm putting a test on it.
4 years, 1 month ago (2016-11-04 14:53:26 UTC) #4
jochen (gone - plz use gerrit)
Hum, let's ask dcheng@ to also have a look at this
4 years, 1 month ago (2016-11-04 14:55:07 UTC) #6
dcheng
https://codereview.chromium.org/2472333003/diff/1/third_party/WebKit/Source/core/dom/Document.cpp File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/2472333003/diff/1/third_party/WebKit/Source/core/dom/Document.cpp#newcode5427 third_party/WebKit/Source/core/dom/Document.cpp:5427: // those URLs as 'about:blank' in Blink. So I'm ...
4 years, 1 month ago (2016-11-04 18:11:28 UTC) #9
Mike West
https://codereview.chromium.org/2472333003/diff/1/third_party/WebKit/Source/core/dom/Document.cpp File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/2472333003/diff/1/third_party/WebKit/Source/core/dom/Document.cpp#newcode5427 third_party/WebKit/Source/core/dom/Document.cpp:5427: // those URLs as 'about:blank' in Blink. On 2016/11/04 ...
4 years, 1 month ago (2016-11-18 11:06:23 UTC) #12
dcheng
https://codereview.chromium.org/2472333003/diff/40001/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/cascade/cross-origin.html File third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/cascade/cross-origin.html (right): https://codereview.chromium.org/2472333003/diff/40001/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/cascade/cross-origin.html#newcode27 third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/cascade/cross-origin.html:27: " var i = document.createElement('img');" + A fun hack ...
4 years, 1 month ago (2016-11-21 10:14:24 UTC) #19
Mike West
https://codereview.chromium.org/2472333003/diff/40001/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/cascade/cross-origin.html File third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/cascade/cross-origin.html (right): https://codereview.chromium.org/2472333003/diff/40001/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/cascade/cross-origin.html#newcode27 third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/cascade/cross-origin.html:27: " var i = document.createElement('img');" + On 2016/11/21 at ...
4 years ago (2016-11-29 10:16:29 UTC) #22
Mike West
jochen@: Assuming dcheng@ is happy with the patch, would you be willing to stamp the ...
4 years ago (2016-11-29 14:40:05 UTC) #27
jochen (gone - plz use gerrit)
totally, lgtm
4 years ago (2016-11-29 14:49:02 UTC) #28
dcheng
lgtm
4 years ago (2016-11-29 22:05:12 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2472333003/60001
4 years ago (2016-11-30 08:19:54 UTC) #31
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years ago (2016-11-30 08:25:32 UTC) #33
commit-bot: I haz the power
4 years ago (2016-11-30 08:28:12 UTC) #35
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/e82aced182b4fe7ac99437943a7c39238796c1d9
Cr-Commit-Position: refs/heads/master@{#435165}

Powered by Google App Engine
This is Rietveld 408576698