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

Issue 1495013002: Check for equality of the URL's origin in replaceState/pushState (Closed)

Created:
5 years ago by robwu
Modified:
5 years ago
Reviewers:
brettw, Mike West
CC:
blink-reviews, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Check for equality of the URL's origin in replaceState/pushState history.pushState/replaceState should not change the origin part of the URL (the whole URL minus the path, query and reference fragment). The previous check failed to do this because canAccess respects whitelists (such as those for extensions) and allows same-origin URLs (such as blob:). BUG=447414 Committed: https://crrev.com/587195f6886817f7b634bf58eafa7f900a9b6532 Cr-Commit-Position: refs/heads/master@{#364140}

Patch Set 1 #

Patch Set 2 : Allow --disable-web-security again, add more tests #

Total comments: 15

Patch Set 3 : Put all logic in History.cpp, change tests to testharness #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+185 lines, -14 lines) Patch
M third_party/WebKit/LayoutTests/http/tests/history/push-state-in-new-frame-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/loading/state-object-security-exception-expected.txt View 1 1 chunk +12 lines, -12 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/navigation/pushstate-at-unique-origin-denied.html View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/navigation/pushstate-auth-denied.html View 1 2 1 chunk +15 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/navigation/pushstate-in-blob-denied.html View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/navigation/pushstate-whitelisted-at-blob-denied.html View 1 1 chunk +22 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/navigation/pushstate-whitelisted-at-blob-denied-expected.txt View 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/navigation/pushstate-whitelisted-at-unique-origin-denied.html View 1 2 1 chunk +14 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/navigation/pushstate-whitelisted-auth-denied.html View 1 2 1 chunk +19 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/navigation/pushstate-whitelisted-denied.html View 1 2 1 chunk +18 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/navigation/pushstate-whitelisted-in-blob-denied.html View 1 2 1 chunk +15 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/History.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/History.cpp View 1 2 2 chunks +46 lines, -2 lines 2 comments Download
M third_party/WebKit/Source/platform/weborigin/SecurityOrigin.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 21 (6 generated)
robwu
5 years ago (2015-12-06 17:54:29 UTC) #2
brettw
+mkwst who looks like he's done the most work on SecurityOrigin. I'm not actually super ...
5 years ago (2015-12-08 05:41:32 UTC) #4
robwu
https://codereview.chromium.org/1495013002/diff/20001/third_party/WebKit/Source/platform/weborigin/KURL.cpp File third_party/WebKit/Source/platform/weborigin/KURL.cpp (right): https://codereview.chromium.org/1495013002/diff/20001/third_party/WebKit/Source/platform/weborigin/KURL.cpp#newcode734 third_party/WebKit/Source/platform/weborigin/KURL.cpp:734: // FIXME: Abstraction this into a function in WTFString.h. ...
5 years ago (2015-12-08 08:45:17 UTC) #5
Mike West
Thanks for taking a stab at this! I have a few comments inline. https://codereview.chromium.org/1495013002/diff/20001/third_party/WebKit/LayoutTests/http/tests/navigation/pushstate-at-unique-origin-denied.html File ...
5 years ago (2015-12-08 13:45:19 UTC) #6
robwu
https://codereview.chromium.org/1495013002/diff/20001/third_party/WebKit/LayoutTests/http/tests/navigation/pushstate-at-unique-origin-denied.html File third_party/WebKit/LayoutTests/http/tests/navigation/pushstate-at-unique-origin-denied.html (right): https://codereview.chromium.org/1495013002/diff/20001/third_party/WebKit/LayoutTests/http/tests/navigation/pushstate-at-unique-origin-denied.html#newcode2 third_party/WebKit/LayoutTests/http/tests/navigation/pushstate-at-unique-origin-denied.html:2: <script> On 2015/12/08 13:45:18, Mike West wrote: > Please ...
5 years ago (2015-12-08 14:06:39 UTC) #7
robwu
https://codereview.chromium.org/1495013002/diff/20001/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp File third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp (right): https://codereview.chromium.org/1495013002/diff/20001/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp#newcode377 third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp:377: if (!equalIgnoringPathQueryAndFragment(a, b)) On 2015/12/08 13:45:19, Mike West wrote: ...
5 years ago (2015-12-08 14:10:39 UTC) #8
Mike West
https://codereview.chromium.org/1495013002/diff/20001/third_party/WebKit/LayoutTests/http/tests/navigation/pushstate-at-unique-origin-denied.html File third_party/WebKit/LayoutTests/http/tests/navigation/pushstate-at-unique-origin-denied.html (right): https://codereview.chromium.org/1495013002/diff/20001/third_party/WebKit/LayoutTests/http/tests/navigation/pushstate-at-unique-origin-denied.html#newcode2 third_party/WebKit/LayoutTests/http/tests/navigation/pushstate-at-unique-origin-denied.html:2: <script> On 2015/12/08 at 14:06:39, robwu wrote: > I ...
5 years ago (2015-12-08 14:18:41 UTC) #9
robwu
Mike: I've moved all logic to History.cpp and changed all but one test to testharness. ...
5 years ago (2015-12-08 16:33:48 UTC) #10
Mike West
LGTM. Thanks for taking another pass. :) https://codereview.chromium.org/1495013002/diff/40001/third_party/WebKit/Source/core/frame/History.cpp File third_party/WebKit/Source/core/frame/History.cpp (right): https://codereview.chromium.org/1495013002/diff/40001/third_party/WebKit/Source/core/frame/History.cpp#newcode188 third_party/WebKit/Source/core/frame/History.cpp:188: if (!url.isValid()) ...
5 years ago (2015-12-08 17:34:59 UTC) #11
robwu
https://codereview.chromium.org/1495013002/diff/40001/third_party/WebKit/Source/core/frame/History.cpp File third_party/WebKit/Source/core/frame/History.cpp (right): https://codereview.chromium.org/1495013002/diff/40001/third_party/WebKit/Source/core/frame/History.cpp#newcode188 third_party/WebKit/Source/core/frame/History.cpp:188: if (!url.isValid()) On 2015/12/08 17:34:59, Mike West wrote: > ...
5 years ago (2015-12-08 20:31:48 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1495013002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1495013002/40001
5 years ago (2015-12-09 16:14:08 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_android_rel_ng/builds/107759) win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, ...
5 years ago (2015-12-09 18:19:01 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1495013002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1495013002/40001
5 years ago (2015-12-09 18:36:56 UTC) #18
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years ago (2015-12-09 20:11:05 UTC) #19
commit-bot: I haz the power
5 years ago (2015-12-09 20:12:17 UTC) #21
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/587195f6886817f7b634bf58eafa7f900a9b6532
Cr-Commit-Position: refs/heads/master@{#364140}

Powered by Google App Engine
This is Rietveld 408576698