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

Issue 980383004: Relax same-origin policy for ServiceWorker openWindow() in Chromium. (Closed)

Created:
5 years, 9 months ago by mlamouri (slow - plz ping)
Modified:
5 years, 9 months ago
CC:
chromium-reviews, darin-cc_chromium.org, horo+watch_chromium.org, jam, jsbell+serviceworker_chromium.org, kinuko+serviceworker, kinuko+watch, nhiroki, serviceworker-reviews, tzik
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Relax same-origin policy for ServiceWorker openWindow() in Chromium. Per blink-dev discussion: https://groups.google.com/a/chromium.org/d/msg/blink-dev/vCd9TysLAso/UcNQMme-9LsJ This is relaxing the browser-side checks in order to no longer kill a renderer process if it tries to open a cross-origin window from a service worker. It will allow the Blink restriction to be relaxed: https://codereview.chromium.org/985043002 The browser process now checks whether the renderer process is allowed access to the given URL, blocking access to special URLs like chrome://. BUG=457187 Committed: https://crrev.com/1af793910c3a05bf5ab0d790e1bcf282d03592d9 Cr-Commit-Position: refs/heads/master@{#319648}

Patch Set 1 #

Patch Set 2 : don't kill but sanitize #

Total comments: 6

Patch Set 3 : rebase #

Total comments: 2

Patch Set 4 : reject #

Total comments: 10

Patch Set 5 : review comments #

Total comments: 4

Patch Set 6 : review comments #

Patch Set 7 : review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -14 lines) Patch
M content/browser/service_worker/service_worker_version.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_version.cc View 1 2 3 4 5 5 chunks +22 lines, -8 lines 0 comments Download
M content/common/service_worker/service_worker_messages.h View 1 2 3 4 5 1 chunk +3 lines, -2 lines 0 comments Download
M content/renderer/service_worker/service_worker_script_context.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/service_worker/service_worker_script_context.cc View 1 2 3 4 5 2 chunks +4 lines, -2 lines 0 comments Download

Messages

Total messages: 30 (4 generated)
mlamouri (slow - plz ping)
tsepez@, jochen@ and mkwst@, could one of you have a look with regard to the ...
5 years, 9 months ago (2015-03-06 15:44:56 UTC) #2
Mike West
Other than all the red bots, this looks pretty reasonable to me, given the discussion ...
5 years, 9 months ago (2015-03-06 15:53:22 UTC) #3
mlamouri (slow - plz ping)
On 2015/03/06 at 15:53:22, mkwst wrote: > Other than all the red bots, this looks ...
5 years, 9 months ago (2015-03-06 15:57:44 UTC) #4
Mike West
Got it. LGTM, but you'll need an OWNER.
5 years, 9 months ago (2015-03-06 16:00:08 UTC) #5
falken
drive-by comment https://codereview.chromium.org/980383004/diff/20001/content/browser/service_worker/service_worker_version.cc File content/browser/service_worker/service_worker_version.cc (right): https://codereview.chromium.org/980383004/diff/20001/content/browser/service_worker/service_worker_version.cc#newcode1172 content/browser/service_worker/service_worker_version.cc:1172: // URL. It is possible to receive ...
5 years, 9 months ago (2015-03-06 16:03:08 UTC) #7
mlamouri (slow - plz ping)
https://codereview.chromium.org/980383004/diff/20001/content/browser/service_worker/service_worker_version.cc File content/browser/service_worker/service_worker_version.cc (right): https://codereview.chromium.org/980383004/diff/20001/content/browser/service_worker/service_worker_version.cc#newcode1177 content/browser/service_worker/service_worker_version.cc:1177: sanitized_url = GURL(url::kAboutBlankURL); On 2015/03/06 at 16:03:08, falken wrote: ...
5 years, 9 months ago (2015-03-06 16:17:20 UTC) #8
mlamouri (slow - plz ping)
I swear, I'm not a parrot :)
5 years, 9 months ago (2015-03-06 16:17:57 UTC) #9
falken
https://codereview.chromium.org/980383004/diff/20001/content/browser/service_worker/service_worker_version.cc File content/browser/service_worker/service_worker_version.cc (right): https://codereview.chromium.org/980383004/diff/20001/content/browser/service_worker/service_worker_version.cc#newcode1177 content/browser/service_worker/service_worker_version.cc:1177: sanitized_url = GURL(url::kAboutBlankURL); On 2015/03/06 16:17:19, Mounir Lamouri wrote: ...
5 years, 9 months ago (2015-03-06 16:43:32 UTC) #10
mlamouri (slow - plz ping)
Double-checked: using FilterURL would be under optimized given that it requires a RenderProcessHost which would ...
5 years, 9 months ago (2015-03-06 17:55:08 UTC) #11
mlamouri (slow - plz ping)
Note: falken@ and michaeln@ I will need one of your l-g-t-m in order to land ...
5 years, 9 months ago (2015-03-06 21:25:54 UTC) #12
michaeln
https://codereview.chromium.org/980383004/diff/40001/content/browser/service_worker/service_worker_version.cc File content/browser/service_worker/service_worker_version.cc (right): https://codereview.chromium.org/980383004/diff/40001/content/browser/service_worker/service_worker_version.cc#newcode1179 content/browser/service_worker/service_worker_version.cc:1179: sanitized_url = GURL(url::kAboutBlankURL); Are you sure about opening about:blank ...
5 years, 9 months ago (2015-03-06 23:26:03 UTC) #13
mlamouri (slow - plz ping)
https://codereview.chromium.org/980383004/diff/40001/content/browser/service_worker/service_worker_version.cc File content/browser/service_worker/service_worker_version.cc (right): https://codereview.chromium.org/980383004/diff/40001/content/browser/service_worker/service_worker_version.cc#newcode1179 content/browser/service_worker/service_worker_version.cc:1179: sanitized_url = GURL(url::kAboutBlankURL); On 2015/03/06 at 23:26:03, michaeln wrote: ...
5 years, 9 months ago (2015-03-06 23:40:41 UTC) #14
michaeln
> Just to make sure it's clear: the CanRequestURL() is not expected to return > ...
5 years, 9 months ago (2015-03-07 00:02:51 UTC) #15
mlamouri (slow - plz ping)
On 2015/03/07 at 00:02:51, michaeln wrote: > > Just to make sure it's clear: the ...
5 years, 9 months ago (2015-03-07 00:13:47 UTC) #16
falken
On 2015/03/07 00:13:47, Mounir Lamouri wrote: > On 2015/03/07 at 00:02:51, michaeln wrote: > > ...
5 years, 9 months ago (2015-03-07 04:58:33 UTC) #17
mlamouri (slow - plz ping)
On 2015/03/07 at 04:58:33, falken wrote: > On 2015/03/07 00:13:47, Mounir Lamouri wrote: > > ...
5 years, 9 months ago (2015-03-07 19:20:20 UTC) #18
falken
Rejecting sgtm, some comments though. https://codereview.chromium.org/980383004/diff/60001/content/browser/service_worker/service_worker_version.cc File content/browser/service_worker/service_worker_version.cc (right): https://codereview.chromium.org/980383004/diff/60001/content/browser/service_worker/service_worker_version.cc#newcode1167 content/browser/service_worker/service_worker_version.cc:1167: // them accordingly to ...
5 years, 9 months ago (2015-03-08 12:23:49 UTC) #19
mlamouri (slow - plz ping)
PTAL https://codereview.chromium.org/980383004/diff/60001/content/browser/service_worker/service_worker_version.cc File content/browser/service_worker/service_worker_version.cc (right): https://codereview.chromium.org/980383004/diff/60001/content/browser/service_worker/service_worker_version.cc#newcode1167 content/browser/service_worker/service_worker_version.cc:1167: // them accordingly to prevent CanRequestURL() call below ...
5 years, 9 months ago (2015-03-08 14:34:12 UTC) #20
falken
lgtm modulo comments https://codereview.chromium.org/980383004/diff/60001/content/browser/service_worker/service_worker_version.cc File content/browser/service_worker/service_worker_version.cc (right): https://codereview.chromium.org/980383004/diff/60001/content/browser/service_worker/service_worker_version.cc#newcode1167 content/browser/service_worker/service_worker_version.cc:1167: // them accordingly to prevent CanRequestURL() ...
5 years, 9 months ago (2015-03-08 15:01:51 UTC) #21
mlamouri (slow - plz ping)
https://codereview.chromium.org/980383004/diff/80001/content/browser/service_worker/service_worker_version.cc File content/browser/service_worker/service_worker_version.cc (right): https://codereview.chromium.org/980383004/diff/80001/content/browser/service_worker/service_worker_version.cc#newcode1164 content/browser/service_worker/service_worker_version.cc:1164: return; On 2015/03/08 at 15:01:50, falken wrote: > We ...
5 years, 9 months ago (2015-03-08 17:53:56 UTC) #22
falken
still lgtm, i think Mike West or another security expert should check it again as ...
5 years, 9 months ago (2015-03-09 03:31:31 UTC) #23
mlamouri (slow - plz ping)
On 2015/03/09 at 03:31:31, falken wrote: > still lgtm, i think Mike West or another ...
5 years, 9 months ago (2015-03-09 10:16:47 UTC) #24
jochen (gone - plz use gerrit)
lgtm
5 years, 9 months ago (2015-03-09 16:14:52 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/980383004/120001
5 years, 9 months ago (2015-03-09 16:17:13 UTC) #28
commit-bot: I haz the power
Committed patchset #7 (id:120001)
5 years, 9 months ago (2015-03-09 16:21:02 UTC) #29
commit-bot: I haz the power
5 years, 9 months ago (2015-03-09 16:21:42 UTC) #30
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/1af793910c3a05bf5ab0d790e1bcf282d03592d9
Cr-Commit-Position: refs/heads/master@{#319648}

Powered by Google App Engine
This is Rietveld 408576698