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

Issue 1745083002: CORS-RFC1918: Force preflights for external requests in DocumentThreadableLoader. (Closed)

Created:
4 years, 9 months ago by Mike West
Modified:
4 years, 7 months ago
CC:
blink-reviews, blink-reviews-dom_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, gavinp+loader_chromium.org, Nate Chapin, kinuko+watch, loading-reviews+fetch_chromium.org, loading-reviews_chromium.org, rwlbuis, sof, tyoshino+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

CORS-RFC1918: Force preflights for external requests in DocumentThreadableLoader. This patch introduces the requirement that "external requests" which go through DocumentThreadableLoader (XHR, Fetch, etc) generate preflights containing an `Access-Control-Request-External` header. The preflight must be answered with a new `Access-Control-Allow-External` response header. Otherwise, the request will be cancelled. This is still behind a runtime flag in `test` mode, but it required updating a number of tests that were making cross-origin requests from sandboxed origins to `127.0.0.1`. I don't expect that to be a common pattern, so adding the relevant headers seems like a reasonable way of addressing the problem for these tests. BUG=590714 Committed: https://crrev.com/c9f85e872f14d0e09a6677fb0703ab949e6fe123 Cr-Commit-Position: refs/heads/master@{#392048}

Patch Set 1 #

Patch Set 2 : Smaller. #

Patch Set 3 : Fix. #

Patch Set 4 : Rebase. #

Patch Set 5 : Rebase. #

Patch Set 6 : Rebase. #

Patch Set 7 : Rebase. #

Patch Set 8 : Tests. #

Patch Set 9 : Tests. #

Patch Set 10 : Error. #

Patch Set 11 : Test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+508 lines, -237 lines) Patch
M third_party/WebKit/LayoutTests/http/tests/cookies/resources/echo-json.php View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/cookies/resources/testharness-helpers.js View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/cookies/same-site/basics.html View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/cookies/same-site/popup-cross-site.html View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/cookies/same-site/popup-cross-site-post.html View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/cookies/same-site/popup-same-site.html View 1 2 3 4 5 6 7 1 chunk +17 lines, -13 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/cookies/same-site/popup-same-site-post.html View 1 2 3 4 5 6 7 1 chunk +22 lines, -18 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/cors-rfc1918/external-to-internal-fetch.html View 1 2 1 chunk +29 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/cors-rfc1918/external-to-internal-xhr.html View 1 2 1 chunk +47 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/cors-rfc1918/internal-to-internal-fetch.html View 1 2 1 chunk +21 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/cors-rfc1918/internal-to-internal-xhr.html View 1 2 1 chunk +49 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/http/tests/security/cors-rfc1918/resources/abe.png View 1 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/cors-rfc1918/resources/preflight.js View 1 1 chunk +3 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/cors-rfc1918/resources/preflight.php View 1 1 chunk +58 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/sandboxed-iframe-fetch-event.html View 1 2 3 4 5 6 7 8 1 chunk +195 lines, -191 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/access-control-basic-allow-access-control-origin-header-data-url.html View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/access-control-sandboxed-iframe-denied-expected.txt View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/access-control-sandboxed-iframe-denied-without-wildcard-expected.txt View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/request-from-popup.html View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/request-from-popup-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/resources/access-control-basic-allow-access-control-origin-header.cgi View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/resources/access-control-sandboxed-iframe-allow.cgi View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/resources/access-control-sandboxed-iframe-allow-origin-null.cgi View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/CrossOriginAccessControl.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/CrossOriginAccessControl.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +17 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp View 1 2 3 4 5 6 7 8 9 5 chunks +20 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/platform/network/HTTPNames.in View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (8 generated)
Mike West
jochen@: WDYT of this? I'm not sure whether the next step would be to look ...
4 years, 7 months ago (2016-05-03 15:47:02 UTC) #7
Mike West
On 2016/05/03 at 15:47:02, Mike West wrote: > jochen@: WDYT of this? > > I'm ...
4 years, 7 months ago (2016-05-06 09:35:51 UTC) #8
jochen (gone - plz use gerrit)
lgtm
4 years, 7 months ago (2016-05-06 09:40:14 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1745083002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1745083002/200001
4 years, 7 months ago (2016-05-06 10:59:42 UTC) #11
lucyortiz830_gmail.com
On 2016/05/06 10:59:42, commit-bot: I haz the power wrote: > CQ is trying da patch. ...
4 years, 7 months ago (2016-05-06 11:15:46 UTC) #12
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years, 7 months ago (2016-05-06 14:06:09 UTC) #13
commit-bot: I haz the power
4 years, 7 months ago (2016-05-06 14:07:21 UTC) #15
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/c9f85e872f14d0e09a6677fb0703ab949e6fe123
Cr-Commit-Position: refs/heads/master@{#392048}

Powered by Google App Engine
This is Rietveld 408576698