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

Issue 2332263002: Updated suborigin serialization to latest spec proposal (Closed)

Created:
4 years, 3 months ago by jww
Modified:
4 years, 2 months ago
Reviewers:
Mike West, nasko
CC:
blink-reviews, chromium-reviews, darin-cc_chromium.org, jam
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Updated suborigin serialization to latest spec proposal This modifiest the serialization format of suborigins so they are now represented in the form https-so://suboriginname.host.name (or, alternatively, with the scheme http-so). This change removes collisions with potentially valid URLs that were being deserialized as suborigins. Additionally, this adds suborigins back as an experimental web platform feature rather than a testing feature. BUG=336894 R=mkwst@chromium.org Committed: https://crrev.com/2cdad9ef3161ee39783c8e62e180da82797bfa78 Cr-Commit-Position: refs/heads/master@{#420828}

Patch Set 1 #

Total comments: 8

Patch Set 2 : Address mkwst's comments #

Patch Set 3 : Fix compile error #

Patch Set 4 : Fix unit tests #

Total comments: 8

Patch Set 5 : Limit schemes that deserialize to suborigin #

Patch Set 6 : Convert suborigin schemes to pseudo schemes #

Total comments: 16

Patch Set 7 : Nits from nasko #

Patch Set 8 : Rebase on ToT #

Patch Set 9 : Temp disable LayoutTest #

Patch Set 10 : Actually disable test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+273 lines, -64 lines) Patch
M content/browser/child_process_security_policy_impl.h View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/child_process_security_policy_impl.cc View 1 2 3 4 5 6 7 2 chunks +17 lines, -0 lines 0 comments Download
M content/browser/child_process_security_policy_unittest.cc View 1 2 3 4 5 6 7 14 chunks +102 lines, -1 line 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.cc View 1 2 3 4 5 6 7 2 chunks +1 line, -2 lines 0 comments Download
M content/common/url_schemes.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
M content/public/common/url_constants.h View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download
M content/public/common/url_constants.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/suborigins/crossorigin/suborigin-cors-fetch-failure-output-expected.txt View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/suborigins/crossorigin/suborigin-cors-fetch-preflight.php View 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/suborigins/crossorigin/suborigin-cors-xhr-failure-output-expected.txt View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/suborigins/crossorigin/suborigin-cors-xhr-preflight.php View 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/suborigins/crossorigin/suborigin-cross-origin-script-window-onerror-cors.php View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/suborigins/crossorigin/suborigin-cross-origin-script-window-onerror-cors-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/suborigins/crossorigin/suborigin-cross-origin-window-event-exception.php View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/suborigins/crossorigin/suborigin-cross-origin-window-event-exception-expected.txt View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/suborigins/crossorigin/suborigin-cross-origin-window-open-exception.php View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/suborigins/crossorigin/suborigin-cross-origin-window-open-exception-expected.txt View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/suborigins/crossorigin/suborigin-cross-origin-worker-onerror-no-cors.php View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/suborigins/crossorigin/suborigin-cross-origin-worker-onerror-no-cors-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-change-document-domain.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-cookies.php View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-postmessage.html View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-unsafe-postmessage-receive.php View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/weborigin/KURL.cpp View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/weborigin/KURLTest.cpp View 1 2 3 4 5 6 7 4 chunks +35 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/weborigin/SecurityOrigin.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp View 1 2 3 4 3 chunks +19 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/platform/weborigin/SecurityOriginTest.cpp View 1 2 3 4 8 chunks +43 lines, -22 lines 0 comments Download

Messages

Total messages: 40 (17 generated)
jww
Hey Mike, given the serialization update in https://github.com/w3c/webappsec-suborigins/pull/45, can you review this change? Thanks!
4 years, 3 months ago (2016-09-13 05:03:43 UTC) #1
Mike West
Thanks, Joel! https://codereview.chromium.org/2332263002/diff/1/content/browser/child_process_security_policy_unittest.cc File content/browser/child_process_security_policy_unittest.cc (right): https://codereview.chromium.org/2332263002/diff/1/content/browser/child_process_security_policy_unittest.cc#newcode123 content/browser/child_process_security_policy_unittest.cc:123: EXPECT_TRUE(p->IsWebSafeScheme(url::kHttpSecureScheme)); s/SecureScheme/SuboriginScheme/? https://codereview.chromium.org/2332263002/diff/1/content/browser/child_process_security_policy_unittest.cc#newcode125 content/browser/child_process_security_policy_unittest.cc:125: EXPECT_TRUE(p->IsWebSafeScheme(url::kHttpsSecureScheme)); Ditto. https://codereview.chromium.org/2332263002/diff/1/url/url_constants.cc ...
4 years, 3 months ago (2016-09-13 18:00:19 UTC) #2
jww
https://codereview.chromium.org/2332263002/diff/1/content/browser/child_process_security_policy_unittest.cc File content/browser/child_process_security_policy_unittest.cc (right): https://codereview.chromium.org/2332263002/diff/1/content/browser/child_process_security_policy_unittest.cc#newcode123 content/browser/child_process_security_policy_unittest.cc:123: EXPECT_TRUE(p->IsWebSafeScheme(url::kHttpSecureScheme)); On 2016/09/13 18:00:18, Mike West wrote: > s/SecureScheme/SuboriginScheme/? ...
4 years, 3 months ago (2016-09-13 18:36:05 UTC) #3
Mike West
LGTM. Let's argue about HTTPS in some other venue. :)
4 years, 3 months ago (2016-09-14 12:51:21 UTC) #4
jww
nasko@, since you're taking a look at my other suborigin CL, would you mind reviewing ...
4 years, 3 months ago (2016-09-14 17:08:57 UTC) #9
jww
nasko@, since you're taking a look at my other suborigin CL, would you mind reviewing ...
4 years, 3 months ago (2016-09-14 17:09:38 UTC) #11
nasko
Apologies about the delay. https://codereview.chromium.org/2332263002/diff/60001/content/browser/child_process_security_policy_impl.cc File content/browser/child_process_security_policy_impl.cc (right): https://codereview.chromium.org/2332263002/diff/60001/content/browser/child_process_security_policy_impl.cc#newcode300 content/browser/child_process_security_policy_impl.cc:300: RegisterWebSafeScheme(kHttpSuboriginScheme); Why not put those ...
4 years, 3 months ago (2016-09-19 22:20:21 UTC) #12
jww
Thanks, nasko. I've inlined a response and question about treating it as a PseudoScheme vs ...
4 years, 3 months ago (2016-09-20 00:24:32 UTC) #13
jww
nasko@, can you take another look? I've converted the suborigin schemes to pseudo schemes and ...
4 years, 3 months ago (2016-09-22 18:58:39 UTC) #14
nasko
I'll take a deeper dive tomorrow, but wanted to send a couple of high level ...
4 years, 3 months ago (2016-09-22 23:53:43 UTC) #15
jww
https://codereview.chromium.org/2332263002/diff/100001/content/browser/child_process_security_policy_impl.cc File content/browser/child_process_security_policy_impl.cc (right): https://codereview.chromium.org/2332263002/diff/100001/content/browser/child_process_security_policy_impl.cc#newcode311 content/browser/child_process_security_policy_impl.cc:311: RegisterPseudoScheme(kHttpSuboriginScheme); On 2016/09/22 23:53:42, nasko (slow) wrote: > I'll ...
4 years, 3 months ago (2016-09-23 04:12:44 UTC) #16
jww
https://codereview.chromium.org/2332263002/diff/100001/content/common/url_schemes.cc File content/common/url_schemes.cc (right): https://codereview.chromium.org/2332263002/diff/100001/content/common/url_schemes.cc#newcode38 content/common/url_schemes.cc:38: url::AddStandardScheme(kHttpSuboriginScheme, url::SCHEME_WITH_PORT); On 2016/09/23 04:12:44, jww wrote: > On ...
4 years, 3 months ago (2016-09-23 16:33:48 UTC) #17
nasko
Thanks for sticking through the scrutiny I've put on your work. I just want to ...
4 years, 3 months ago (2016-09-23 21:59:48 UTC) #18
jww
Thanks, nasko@. I left you one question. Let me know how things look. https://codereview.chromium.org/2332263002/diff/100001/content/browser/child_process_security_policy_impl.cc File ...
4 years, 2 months ago (2016-09-23 22:52:27 UTC) #19
nasko
LGTM! https://codereview.chromium.org/2332263002/diff/100001/content/browser/child_process_security_policy_unittest.cc File content/browser/child_process_security_policy_unittest.cc (right): https://codereview.chromium.org/2332263002/diff/100001/content/browser/child_process_security_policy_unittest.cc#newcode198 content/browser/child_process_security_policy_unittest.cc:198: EXPECT_FALSE(p->CanSetAsOriginHeader(kRendererID, GURL("chrome://foo/bar"))); On 2016/09/23 22:52:27, jww wrote: > ...
4 years, 2 months ago (2016-09-23 23:29:43 UTC) #22
jww
On 2016/09/23 23:29:43, nasko (slow) wrote: > LGTM! > > https://codereview.chromium.org/2332263002/diff/100001/content/browser/child_process_security_policy_unittest.cc > File content/browser/child_process_security_policy_unittest.cc (right): ...
4 years, 2 months ago (2016-09-24 00:27:27 UTC) #25
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/2332263002/160001
4 years, 2 months ago (2016-09-24 00:49:59 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/302318)
4 years, 2 months ago (2016-09-24 01:51:00 UTC) #30
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/2332263002/180001
4 years, 2 months ago (2016-09-24 03:25:17 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/285637)
4 years, 2 months ago (2016-09-24 04:47:12 UTC) #35
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/2332263002/180001
4 years, 2 months ago (2016-09-24 05:05:44 UTC) #37
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 2 months ago (2016-09-24 05:42:21 UTC) #38
commit-bot: I haz the power
4 years, 2 months ago (2016-09-24 05:44:37 UTC) #40
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/2cdad9ef3161ee39783c8e62e180da82797bfa78
Cr-Commit-Position: refs/heads/master@{#420828}

Powered by Google App Engine
This is Rietveld 408576698