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 392993005: Custom handlers should throw SecurityError exception if the URL's origin differs from the document'… (Closed)

Created:
6 years, 5 months ago by pals
Modified:
6 years, 3 months ago
CC:
blink-reviews, gyuyoung.kim_webkit.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Custom handlers should throw SecurityError exception if the URL's origin differs from the document's origin. Secification: http://www.whatwg.org/specs/web-apps/current-work/#custom-handlers "User agents must throw a SecurityError exception if the resulting absolute URL has an origin that differs from the origin specified by the entry settings object." BUG=399184, 406236 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=182527

Patch Set 1 #

Total comments: 9

Patch Set 2 : Fixed review comments #

Total comments: 2

Patch Set 3 : setUniversalAccess #

Patch Set 4 : Rebased the *expected.txt #

Total comments: 4

Patch Set 5 : Fixed nits #

Total comments: 1

Patch Set 6 : Rebase *-expected.txt #

Patch Set 7 : baseURL is not required anymore #

Total comments: 10

Patch Set 8 : moved navigatorcontentutils to http/tests #

Total comments: 10

Patch Set 9 : #

Total comments: 12

Patch Set 10 : Done #

Unified diffs Side-by-side diffs Delta from patch set Stats (+91 lines, -485 lines) Patch
A + LayoutTests/http/tests/navigatorcontentutils/is-protocol-handler-registered.html View 1 2 3 4 5 6 7 2 chunks +16 lines, -4 lines 0 comments Download
A + LayoutTests/http/tests/navigatorcontentutils/is-protocol-handler-registered-expected.txt View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
A + LayoutTests/http/tests/navigatorcontentutils/register-protocol-handler.html View 1 2 3 4 5 6 7 2 chunks +16 lines, -4 lines 0 comments Download
A + LayoutTests/http/tests/navigatorcontentutils/register-protocol-handler-expected.txt View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
A + LayoutTests/http/tests/navigatorcontentutils/unregister-protocol-handler.html View 1 2 3 4 5 6 7 2 chunks +16 lines, -4 lines 0 comments Download
A + LayoutTests/http/tests/navigatorcontentutils/unregister-protocol-handler-expected.txt View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
D LayoutTests/navigatorcontentutils/is-protocol-handler-registered.html View 1 2 3 4 5 6 7 1 chunk +0 lines, -70 lines 0 comments Download
D LayoutTests/navigatorcontentutils/is-protocol-handler-registered-expected.txt View 1 2 3 4 5 6 7 1 chunk +0 lines, -19 lines 0 comments Download
D LayoutTests/navigatorcontentutils/register-protocol-handler.html View 1 2 3 4 5 6 7 1 chunk +0 lines, -119 lines 0 comments Download
D LayoutTests/navigatorcontentutils/register-protocol-handler-expected.txt View 1 2 3 4 5 6 7 1 chunk +0 lines, -50 lines 0 comments Download
D LayoutTests/navigatorcontentutils/unregister-protocol-handler.html View 1 2 3 4 5 6 7 1 chunk +0 lines, -126 lines 0 comments Download
D LayoutTests/navigatorcontentutils/unregister-protocol-handler-expected.txt View 1 2 3 4 5 6 7 1 chunk +0 lines, -51 lines 0 comments Download
M Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp View 1 2 3 4 5 6 7 8 9 5 chunks +20 lines, -15 lines 0 comments Download
M Source/modules/navigatorcontentutils/NavigatorContentUtilsClient.h View 1 2 3 4 5 6 2 chunks +3 lines, -3 lines 0 comments Download
M Source/modules/navigatorcontentutils/testing/NavigatorContentUtilsClientMock.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -4 lines 0 comments Download
M Source/modules/navigatorcontentutils/testing/NavigatorContentUtilsClientMock.cpp View 1 2 3 4 5 6 7 8 9 3 chunks +3 lines, -4 lines 0 comments Download
M Source/web/NavigatorContentUtilsClientImpl.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -3 lines 0 comments Download
M Source/web/NavigatorContentUtilsClientImpl.cpp View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -6 lines 0 comments Download
M public/web/WebViewClient.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -3 lines 0 comments Download

Messages

Total messages: 43 (5 generated)
pals
PTAL.
6 years, 5 months ago (2014-07-16 06:00:44 UTC) #1
gyuyoung-inactive
Yes, we should check whether URL's origin is same with document's one. Patch looks fine ...
6 years, 5 months ago (2014-07-16 06:20:17 UTC) #2
abarth-chromium
https://codereview.chromium.org/392993005/diff/1/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp File Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp (right): https://codereview.chromium.org/392993005/diff/1/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp#newcode96 Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp:96: if (!origin->isSameSchemeHostPort(document.securityOrigin())) { You don't really ever want to ...
6 years, 5 months ago (2014-07-16 16:32:40 UTC) #3
gyuyoung-inactive
https://codereview.chromium.org/392993005/diff/1/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp File Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp (right): https://codereview.chromium.org/392993005/diff/1/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp#newcode163 Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp:163: if (!verifyCustomHandlerURL(*document, baseURL, url, exceptionState)) On 2014/07/16 16:32:39, abarth ...
6 years, 5 months ago (2014-07-17 07:01:19 UTC) #4
pals
Fixed review comments. Please have another look. https://codereview.chromium.org/392993005/diff/1/LayoutTests/navigatorcontentutils/register-protocol-handler.html File LayoutTests/navigatorcontentutils/register-protocol-handler.html (right): https://codereview.chromium.org/392993005/diff/1/LayoutTests/navigatorcontentutils/register-protocol-handler.html#newcode98 LayoutTests/navigatorcontentutils/register-protocol-handler.html:98: // Test ...
6 years, 5 months ago (2014-07-18 14:17:54 UTC) #5
gyuyoung-inactive
https://codereview.chromium.org/392993005/diff/60001/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp File Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp (right): https://codereview.chromium.org/392993005/diff/60001/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp#newcode168 Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp:168: KURL baseURL = document->baseURL(); Should we use "baseURL" local ...
6 years, 5 months ago (2014-07-21 00:30:21 UTC) #6
pals
On 2014/07/16 16:32:40, abarth wrote: > https://codereview.chromium.org/392993005/diff/1/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp > File Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp (right): > > https://codereview.chromium.org/392993005/diff/1/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp#newcode96 > ...
6 years, 5 months ago (2014-07-21 10:24:36 UTC) #7
pals
As I explained in my previous comments, testRunner.setAllowUniversalAccessFromFileURLs(false) does not actually modify m_universalAccess in SecurityOrigin. ...
6 years, 5 months ago (2014-07-22 09:18:06 UTC) #8
gyuyoung-inactive
https://codereview.chromium.org/392993005/diff/100001/LayoutTests/navigatorcontentutils/register-protocol-handler.html File LayoutTests/navigatorcontentutils/register-protocol-handler.html (right): https://codereview.chromium.org/392993005/diff/100001/LayoutTests/navigatorcontentutils/register-protocol-handler.html#newcode98 LayoutTests/navigatorcontentutils/register-protocol-handler.html:98: debug('PASS Invalid url threw SecurityError exception: "' + errorMessage ...
6 years, 5 months ago (2014-07-23 00:07:13 UTC) #9
pals
Fixed. https://codereview.chromium.org/392993005/diff/100001/LayoutTests/navigatorcontentutils/register-protocol-handler.html File LayoutTests/navigatorcontentutils/register-protocol-handler.html (right): https://codereview.chromium.org/392993005/diff/100001/LayoutTests/navigatorcontentutils/register-protocol-handler.html#newcode98 LayoutTests/navigatorcontentutils/register-protocol-handler.html:98: debug('PASS Invalid url threw SecurityError exception: "' + ...
6 years, 5 months ago (2014-07-23 05:39:29 UTC) #10
gyuyoung-inactive
https://codereview.chromium.org/392993005/diff/120001/LayoutTests/navigatorcontentutils/is-protocol-handler-registered-expected.txt File LayoutTests/navigatorcontentutils/is-protocol-handler-registered-expected.txt (right): https://codereview.chromium.org/392993005/diff/120001/LayoutTests/navigatorcontentutils/is-protocol-handler-registered-expected.txt#newcode9 LayoutTests/navigatorcontentutils/is-protocol-handler-registered-expected.txt:9: PASS Invalid url threw SecurityError exception: "Failed to execute ...
6 years, 5 months ago (2014-07-23 06:51:24 UTC) #11
pals
On 2014/07/23 06:51:24, gyuyoung wrote: > https://codereview.chromium.org/392993005/diff/120001/LayoutTests/navigatorcontentutils/is-protocol-handler-registered-expected.txt > File > LayoutTests/navigatorcontentutils/is-protocol-handler-registered-expected.txt > (right): > > ...
6 years, 5 months ago (2014-07-23 06:55:41 UTC) #12
gyuyoung-inactive
Looks good to me on navigator content utils side. However, I'm not sure whether this ...
6 years, 5 months ago (2014-07-23 06:59:52 UTC) #13
pals
On 2014/07/23 06:59:52, gyuyoung wrote: > Looks good to me on navigator content utils side. ...
6 years, 4 months ago (2014-07-31 06:51:21 UTC) #14
gyuyoung-inactive
On 2014/07/31 06:51:21, sanjoy.pal wrote: > On 2014/07/23 06:59:52, gyuyoung wrote: > > Looks good ...
6 years, 4 months ago (2014-07-31 06:56:51 UTC) #15
pals
On 2014/07/31 06:56:51, gyuyoung wrote: > On 2014/07/31 06:51:21, sanjoy.pal wrote: > > On 2014/07/23 ...
6 years, 4 months ago (2014-08-01 09:48:31 UTC) #16
pals
On a second thought, I think this CL mostly moves the security origin check from ...
6 years, 4 months ago (2014-08-06 13:20:32 UTC) #17
abarth-chromium
https://codereview.chromium.org/392993005/diff/160001/LayoutTests/navigatorcontentutils/register-protocol-handler.html File LayoutTests/navigatorcontentutils/register-protocol-handler.html (right): https://codereview.chromium.org/392993005/diff/160001/LayoutTests/navigatorcontentutils/register-protocol-handler.html#newcode10 LayoutTests/navigatorcontentutils/register-protocol-handler.html:10: testRunner.setAllowUniversalAccessFromFileURLs(false); This is impossible. Instead, you need to put ...
6 years, 4 months ago (2014-08-06 18:34:56 UTC) #18
abarth-chromium
6 years, 4 months ago (2014-08-06 18:34:58 UTC) #19
pals
https://codereview.chromium.org/392993005/diff/160001/LayoutTests/navigatorcontentutils/register-protocol-handler.html File LayoutTests/navigatorcontentutils/register-protocol-handler.html (right): https://codereview.chromium.org/392993005/diff/160001/LayoutTests/navigatorcontentutils/register-protocol-handler.html#newcode10 LayoutTests/navigatorcontentutils/register-protocol-handler.html:10: testRunner.setAllowUniversalAccessFromFileURLs(false); On 2014/08/06 18:34:55, abarth wrote: > This is ...
6 years, 4 months ago (2014-08-06 18:46:47 UTC) #20
pals
Please take a look. https://codereview.chromium.org/392993005/diff/160001/LayoutTests/navigatorcontentutils/register-protocol-handler.html File LayoutTests/navigatorcontentutils/register-protocol-handler.html (right): https://codereview.chromium.org/392993005/diff/160001/LayoutTests/navigatorcontentutils/register-protocol-handler.html#newcode10 LayoutTests/navigatorcontentutils/register-protocol-handler.html:10: testRunner.setAllowUniversalAccessFromFileURLs(false); On 2014/08/06 18:34:55, abarth ...
6 years, 4 months ago (2014-08-07 14:06:06 UTC) #21
pals
Friendly ping.
6 years, 4 months ago (2014-08-20 13:41:16 UTC) #22
abarth-chromium
https://codereview.chromium.org/392993005/diff/200001/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp File Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp (right): https://codereview.chromium.org/392993005/diff/200001/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp#newcode88 Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp:88: KURL kurl(baseURL, newURL); document.completeURL(newURL) https://codereview.chromium.org/392993005/diff/200001/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp#newcode170 Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp:170: KURL absoluteURL(baseURL, url); ...
6 years, 4 months ago (2014-08-20 18:15:10 UTC) #23
pals
I am not sure what is the best way to land this change. I have ...
6 years, 4 months ago (2014-08-21 14:02:56 UTC) #24
pals
Trybots are green. PTAL.
6 years, 3 months ago (2014-08-26 10:33:36 UTC) #25
pals
Chormium side changes landed here https://codereview.chromium.org/485103005/. Please review.
6 years, 3 months ago (2014-09-01 12:58:32 UTC) #26
pals
On 2014/09/01 12:58:32, sanjoy_pal wrote: > Chormium side changes landed here https://codereview.chromium.org/485103005/. > Please review. ...
6 years, 3 months ago (2014-09-16 13:20:55 UTC) #30
gyuyoung-inactive
On 2014/09/16 13:20:55, sanjoy_pal wrote: > On 2014/09/01 12:58:32, sanjoy_pal wrote: > > Chormium side ...
6 years, 3 months ago (2014-09-17 01:37:13 UTC) #31
gyuyoung-inactive
On 2014/09/17 01:37:13, gyuyoung wrote: > On 2014/09/16 13:20:55, sanjoy_pal wrote: > > On 2014/09/01 ...
6 years, 3 months ago (2014-09-17 01:37:22 UTC) #32
gyuyoung-inactive
On 2014/09/16 13:20:55, sanjoy_pal wrote: > On 2014/09/01 12:58:32, sanjoy_pal wrote: > > Chormium side ...
6 years, 3 months ago (2014-09-17 01:38:18 UTC) #33
haraken
The change looks good. Does the new behavior align with other browsers?
6 years, 3 months ago (2014-09-22 05:44:52 UTC) #34
haraken
On 2014/09/22 05:44:52, haraken wrote: > The change looks good. > > Does the new ...
6 years, 3 months ago (2014-09-22 05:51:10 UTC) #35
pals
On 2014/09/22 05:51:10, haraken wrote: > On 2014/09/22 05:44:52, haraken wrote: > > The change ...
6 years, 3 months ago (2014-09-22 05:54:27 UTC) #37
tkent
https://codereview.chromium.org/392993005/diff/260001/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp File Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp (right): https://codereview.chromium.org/392993005/diff/260001/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp#newcode87 Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp:87: KURL baseURL = document.baseURL(); This variable looks unnecessary. The ...
6 years, 3 months ago (2014-09-22 09:53:15 UTC) #38
pals
Fixed the issues. PTAL. https://codereview.chromium.org/392993005/diff/260001/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp File Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp (right): https://codereview.chromium.org/392993005/diff/260001/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp#newcode87 Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp:87: KURL baseURL = document.baseURL(); On ...
6 years, 3 months ago (2014-09-22 11:37:53 UTC) #39
tkent
lgtm
6 years, 3 months ago (2014-09-23 22:45:09 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/392993005/280001
6 years, 3 months ago (2014-09-23 22:46:13 UTC) #42
commit-bot: I haz the power
6 years, 3 months ago (2014-09-23 23:54:28 UTC) #43
Message was sent while issue was closed.
Committed patchset #10 (id:280001) as 182527

Powered by Google App Engine
This is Rietveld 408576698