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

Issue 594803002: Transfer SecurityOrigin overrides to Workers. (Closed)

Created:
6 years, 3 months ago by sof
Modified:
6 years, 2 months ago
CC:
blink-reviews, falken, horo+watch_chromium.org, kinuko+worker_chromium.org, mkwst+moarreviews_chromium.org
Project:
blink
Visibility:
Public.

Description

Transfer SecurityOrigin overrides to Workers. Should a Document be operating with a SecurityOrigin that grants (powerful) abilities like disabling same-origin policy or allows file access, have those transfer over to any new Workers created. R=horo,mkwst,jochen BUG=254993 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=182897

Patch Set 1 #

Patch Set 2 : compilation fix #

Patch Set 3 : Add tests #

Total comments: 7

Patch Set 4 : Drop separate 'overrides' type and transfer-by-origin instead #

Total comments: 10

Patch Set 5 : Rename transferPrivileges() to transferPrivilegesFrom() over security origins #

Unified diffs Side-by-side diffs Delta from patch set Stats (+158 lines, -28 lines) Patch
A LayoutTests/http/tests/xmlhttprequest/resources/echo-request-origin.php View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/xmlhttprequest/resources/frame-with-insecure-xhr.html View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/xmlhttprequest/resources/insecure-xhr.js View 1 2 1 chunk +18 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/xmlhttprequest/workers/resources/frame-with-insecure-xhr.html View 1 2 1 chunk +8 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/xmlhttprequest/workers/xmlhttprequest-allowed-with-disabled-web-security.html View 1 2 1 chunk +27 lines, -0 lines 0 comments Download
A + LayoutTests/http/tests/xmlhttprequest/workers/xmlhttprequest-allowed-with-disabled-web-security-expected.txt View 1 2 1 chunk +2 lines, -5 lines 0 comments Download
A LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-allowed-with-disabled-web-security.html View 1 2 1 chunk +27 lines, -0 lines 0 comments Download
A + LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-allowed-with-disabled-web-security-expected.txt View 1 2 1 chunk +2 lines, -3 lines 0 comments Download
M Source/core/workers/DedicatedWorkerGlobalScope.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/core/workers/DedicatedWorkerGlobalScope.cpp View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/workers/SharedWorkerGlobalScope.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/core/workers/SharedWorkerGlobalScope.cpp View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/workers/WorkerGlobalScope.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/core/workers/WorkerGlobalScope.cpp View 1 2 3 4 2 chunks +4 lines, -1 line 0 comments Download
M Source/core/workers/WorkerMessagingProxy.cpp View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M Source/core/workers/WorkerThreadStartupData.h View 1 2 3 4 2 chunks +18 lines, -3 lines 0 comments Download
M Source/core/workers/WorkerThreadStartupData.cpp View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M Source/modules/serviceworkers/ServiceWorkerGlobalScope.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M Source/platform/weborigin/SecurityOrigin.h View 1 2 3 4 1 chunk +11 lines, -0 lines 0 comments Download
M Source/platform/weborigin/SecurityOrigin.cpp View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download
M Source/web/WebEmbeddedWorkerImpl.cpp View 1 2 3 4 2 chunks +4 lines, -0 lines 0 comments Download
M Source/web/WebSharedWorkerImpl.cpp View 1 2 3 4 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 21 (3 generated)
sof
Please take a look. The request to have --disable-web-security also apply within Workers, seems a ...
6 years, 3 months ago (2014-09-23 22:03:13 UTC) #2
horo
https://codereview.chromium.org/594803002/diff/40001/Source/web/WebEmbeddedWorkerImpl.cpp File Source/web/WebEmbeddedWorkerImpl.cpp (right): https://codereview.chromium.org/594803002/diff/40001/Source/web/WebEmbeddedWorkerImpl.cpp#newcode406 Source/web/WebEmbeddedWorkerImpl.cpp:406: if (document->securityOrigin()) I think WebEmbeddedWorkerImpl's m_mainFrame is not affected ...
6 years, 3 months ago (2014-09-24 05:42:27 UTC) #3
Mike West
This looks like a reasonable approach, though I'm not sure you really need the generic ...
6 years, 2 months ago (2014-09-26 11:29:10 UTC) #5
sof
On 2014/09/26 11:29:10, Mike West wrote: > This looks like a reasonable approach, though I'm ...
6 years, 2 months ago (2014-09-26 13:52:44 UTC) #6
Mike West
On 2014/09/26 13:52:44, sof wrote: > Separately propagating these two 'security' bits in the startup ...
6 years, 2 months ago (2014-09-26 14:07:25 UTC) #7
sof
On 2014/09/26 14:07:25, Mike West wrote: > On 2014/09/26 13:52:44, sof wrote: > > Separately ...
6 years, 2 months ago (2014-09-26 14:19:15 UTC) #8
sof
On 2014/09/26 14:19:15, sof wrote: > On 2014/09/26 14:07:25, Mike West wrote: > > On ...
6 years, 2 months ago (2014-09-28 17:07:12 UTC) #9
sof
https://codereview.chromium.org/594803002/diff/40001/Source/web/WebEmbeddedWorkerImpl.cpp File Source/web/WebEmbeddedWorkerImpl.cpp (right): https://codereview.chromium.org/594803002/diff/40001/Source/web/WebEmbeddedWorkerImpl.cpp#newcode406 Source/web/WebEmbeddedWorkerImpl.cpp:406: if (document->securityOrigin()) On 2014/09/24 05:42:27, horo wrote: > I ...
6 years, 2 months ago (2014-09-28 17:10:22 UTC) #10
Mike West
At first glance, this looks pretty good. I'll take a more detailed pass in the ...
6 years, 2 months ago (2014-09-28 20:41:00 UTC) #11
Mike West
LGTM. Thanks for taking another pass. A few comments inline (and you'll need a platform/ ...
6 years, 2 months ago (2014-09-29 07:37:23 UTC) #12
sof
https://codereview.chromium.org/594803002/diff/60001/Source/core/workers/WorkerThreadStartupData.h File Source/core/workers/WorkerThreadStartupData.h (right): https://codereview.chromium.org/594803002/diff/60001/Source/core/workers/WorkerThreadStartupData.h#newcode67 Source/core/workers/WorkerThreadStartupData.h:67: // To have those be transferred to the origin ...
6 years, 2 months ago (2014-09-29 09:42:28 UTC) #13
horo
lgtm
6 years, 2 months ago (2014-09-29 10:33:41 UTC) #14
Mike West
SLGTM. Thanks!
6 years, 2 months ago (2014-09-29 10:35:08 UTC) #15
sof
jochen, abarth: does the SecurityOrigin change look acceptable to you?
6 years, 2 months ago (2014-09-29 12:53:12 UTC) #16
jochen (gone - plz use gerrit)
lgtm
6 years, 2 months ago (2014-09-30 08:28:41 UTC) #17
sof
thanks all for the reviews.
6 years, 2 months ago (2014-09-30 08:38:54 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/594803002/80001
6 years, 2 months ago (2014-09-30 08:39:14 UTC) #20
commit-bot: I haz the power
6 years, 2 months ago (2014-09-30 09:09:47 UTC) #21
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as 182897

Powered by Google App Engine
This is Rietveld 408576698