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

Issue 1199183002: Throw a SecurityError when navigator.serviceWorker is accessed in a sandboxed iframe. (Closed)

Created:
5 years, 6 months ago by horo
Modified:
5 years, 6 months ago
Reviewers:
falken, tkent, nhiroki
CC:
blink-reviews, michaeln, jsbell+serviceworker_chromium.org, kenjibaheux+watch_chromium.org, tzik, serviceworker-reviews, falken, kinuko+serviceworker, horo+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Throw a SecurityError when navigator.serviceWorker is accessed in a sandboxed iframe. BUG=486308 TEST=./blink/tools/run_layout_tests.sh http/tests/serviceworker/chromium/sandboxed-iframe-navigator-serviceworker.html Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=197711

Patch Set 1 : #

Total comments: 6

Patch Set 2 : incorporated nhiroki's comment #

Total comments: 2

Patch Set 3 : incorporated falken's comment #

Total comments: 2

Patch Set 4 : use ASSERT_NO_EXCEPTION #

Unified diffs Side-by-side diffs Delta from patch set Stats (+118 lines, -8 lines) Patch
A LayoutTests/http/tests/serviceworker/chromium/resources/sandboxed-iframe-navigator-serviceworker-iframe.html View 1 chunk +12 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/serviceworker/chromium/sandboxed-iframe-navigator-serviceworker.html View 1 1 chunk +87 lines, -0 lines 0 comments Download
M Source/modules/serviceworkers/NavigatorServiceWorker.h View 2 chunks +3 lines, -2 lines 0 comments Download
M Source/modules/serviceworkers/NavigatorServiceWorker.cpp View 1 2 3 2 chunks +14 lines, -5 lines 0 comments Download
M Source/modules/serviceworkers/NavigatorServiceWorker.idl View 1 chunk +1 line, -1 line 0 comments Download
M Source/platform/weborigin/SecurityOrigin.h View 1 chunk +1 line, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 22 (7 generated)
horo
nhiroki@ Could you please review this?
5 years, 6 months ago (2015-06-23 07:59:59 UTC) #4
nhiroki
> Throw a SecurityError when navigator.serviceWorker is accessed in a sandboxed iframe. Question) I couldn't ...
5 years, 6 months ago (2015-06-23 08:28:14 UTC) #5
horo
On 2015/06/23 08:28:14, nhiroki wrote: > > Throw a SecurityError when navigator.serviceWorker is accessed in ...
5 years, 6 months ago (2015-06-23 10:05:49 UTC) #6
nhiroki
On 2015/06/23 10:05:49, horo wrote: > On 2015/06/23 08:28:14, nhiroki wrote: > > > Throw ...
5 years, 6 months ago (2015-06-24 02:47:11 UTC) #7
nhiroki
Looks pretty good. https://codereview.chromium.org/1199183002/diff/40001/LayoutTests/http/tests/serviceworker/chromium/sandboxed-iframe-navigator-serviceworker.html File LayoutTests/http/tests/serviceworker/chromium/sandboxed-iframe-navigator-serviceworker.html (right): https://codereview.chromium.org/1199183002/diff/40001/LayoutTests/http/tests/serviceworker/chromium/sandboxed-iframe-navigator-serviceworker.html#newcode37 LayoutTests/http/tests/serviceworker/chromium/sandboxed-iframe-navigator-serviceworker.html:37: async_test(function(t) { promise_test? https://codereview.chromium.org/1199183002/diff/40001/LayoutTests/http/tests/serviceworker/chromium/sandboxed-iframe-navigator-serviceworker.html#newcode85 LayoutTests/http/tests/serviceworker/chromium/sandboxed-iframe-navigator-serviceworker.html:85: }, ...
5 years, 6 months ago (2015-06-24 02:48:17 UTC) #8
horo
https://codereview.chromium.org/1199183002/diff/40001/LayoutTests/http/tests/serviceworker/chromium/sandboxed-iframe-navigator-serviceworker.html File LayoutTests/http/tests/serviceworker/chromium/sandboxed-iframe-navigator-serviceworker.html (right): https://codereview.chromium.org/1199183002/diff/40001/LayoutTests/http/tests/serviceworker/chromium/sandboxed-iframe-navigator-serviceworker.html#newcode37 LayoutTests/http/tests/serviceworker/chromium/sandboxed-iframe-navigator-serviceworker.html:37: async_test(function(t) { On 2015/06/24 02:48:17, nhiroki wrote: > promise_test? ...
5 years, 6 months ago (2015-06-24 03:39:20 UTC) #9
nhiroki
lgtm
5 years, 6 months ago (2015-06-24 04:38:26 UTC) #10
falken
https://codereview.chromium.org/1199183002/diff/60001/Source/modules/serviceworkers/NavigatorServiceWorker.cpp File Source/modules/serviceworkers/NavigatorServiceWorker.cpp (right): https://codereview.chromium.org/1199183002/diff/60001/Source/modules/serviceworkers/NavigatorServiceWorker.cpp#newcode69 Source/modules/serviceworkers/NavigatorServiceWorker.cpp:69: exceptionState.throwSecurityError("Access to service worker is denied."); Can we make ...
5 years, 6 months ago (2015-06-24 04:40:44 UTC) #12
nhiroki
Sorry, one more nit. Can you add TEST= line in the CL description?
5 years, 6 months ago (2015-06-24 04:46:38 UTC) #13
horo
https://codereview.chromium.org/1199183002/diff/60001/Source/modules/serviceworkers/NavigatorServiceWorker.cpp File Source/modules/serviceworkers/NavigatorServiceWorker.cpp (right): https://codereview.chromium.org/1199183002/diff/60001/Source/modules/serviceworkers/NavigatorServiceWorker.cpp#newcode69 Source/modules/serviceworkers/NavigatorServiceWorker.cpp:69: exceptionState.throwSecurityError("Access to service worker is denied."); On 2015/06/24 04:40:44, ...
5 years, 6 months ago (2015-06-24 05:58:31 UTC) #14
horo
tkent@ Could you please review Source/platform/weborigin/SecurityOrigin.h?
5 years, 6 months ago (2015-06-24 05:59:15 UTC) #16
tkent
lgtm https://codereview.chromium.org/1199183002/diff/80001/Source/modules/serviceworkers/NavigatorServiceWorker.cpp File Source/modules/serviceworkers/NavigatorServiceWorker.cpp (right): https://codereview.chromium.org/1199183002/diff/80001/Source/modules/serviceworkers/NavigatorServiceWorker.cpp#newcode41 Source/modules/serviceworkers/NavigatorServiceWorker.cpp:41: NonThrowableExceptionState exceptionState; probably |supplement->serviceWorker(ASSERT_NO_EXCEPTION);| is simpler.
5 years, 6 months ago (2015-06-24 06:22:17 UTC) #17
horo
Thank you!! https://codereview.chromium.org/1199183002/diff/80001/Source/modules/serviceworkers/NavigatorServiceWorker.cpp File Source/modules/serviceworkers/NavigatorServiceWorker.cpp (right): https://codereview.chromium.org/1199183002/diff/80001/Source/modules/serviceworkers/NavigatorServiceWorker.cpp#newcode41 Source/modules/serviceworkers/NavigatorServiceWorker.cpp:41: NonThrowableExceptionState exceptionState; On 2015/06/24 06:22:17, tkent wrote: ...
5 years, 6 months ago (2015-06-24 06:31:02 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1199183002/100001
5 years, 6 months ago (2015-06-24 06:32:15 UTC) #21
commit-bot: I haz the power
5 years, 6 months ago (2015-06-24 07:45:30 UTC) #22
Message was sent while issue was closed.
Committed patchset #4 (id:100001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=197711

Powered by Google App Engine
This is Rietveld 408576698