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

Issue 14198015: Deny cross-origin access to 'window.history'. (Closed)

Created:
7 years, 7 months ago by Mike West
Modified:
7 years, 7 months ago
CC:
blink-reviews, eseidel
Visibility:
Public.

Description

Deny cross-origin access to 'window.history'. Currently, we allow cross-origin access to certain methods on 'window.history'. This is contrary to both the spec, and the existing behavior of both Gecko and IE[1]. This patch drops the custom security checks on the history object, denying cross-origin access to the object entirely. [1]: https://bug839867.bugzilla.mozilla.org/attachment.cgi?id=712247 Original patch from Adam Barth <abarth@chromium.org>; on http://webkit.org/b/106641. BUG=237080 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=149846

Patch Set 1 #

Patch Set 2 : rebase #

Total comments: 5

Patch Set 3 : getOwnPropertDescriptor. #

Total comments: 1

Patch Set 4 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -358 lines) Patch
M LayoutTests/fast/frames/sandboxed-iframe-history-denied.html View 1 1 chunk +6 lines, -18 lines 0 comments Download
M LayoutTests/fast/frames/sandboxed-iframe-history-denied-expected.txt View 1 1 chunk +2 lines, -4 lines 0 comments Download
M LayoutTests/http/tests/history/cross-origin-replace-history-object-child-expected.txt View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/http/tests/security/cross-frame-access-delete.html View 1 chunk +0 lines, -2 lines 0 comments Download
M LayoutTests/http/tests/security/cross-frame-access-delete-expected.txt View 1 chunk +0 lines, -4 lines 0 comments Download
M LayoutTests/http/tests/security/cross-frame-access-enumeration.html View 1 chunk +0 lines, -27 lines 0 comments Download
M LayoutTests/http/tests/security/cross-frame-access-enumeration-expected.txt View 1 chunk +0 lines, -6 lines 0 comments Download
M LayoutTests/http/tests/security/cross-frame-access-get.html View 1 2 3 2 chunks +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/security/cross-frame-access-get-expected.txt View 1 2 3 3 chunks +2 lines, -1 line 0 comments Download
D LayoutTests/http/tests/security/cross-frame-access-history-get.html View 1 chunk +0 lines, -70 lines 0 comments Download
D LayoutTests/http/tests/security/cross-frame-access-history-get-expected.txt View 1 chunk +0 lines, -25 lines 0 comments Download
D LayoutTests/http/tests/security/cross-frame-access-history-get-override.html View 1 chunk +0 lines, -58 lines 0 comments Download
D LayoutTests/http/tests/security/cross-frame-access-history-get-override-expected.txt View 1 chunk +0 lines, -10 lines 0 comments Download
D LayoutTests/http/tests/security/cross-frame-access-history-prototype.html View 1 chunk +0 lines, -28 lines 0 comments Download
D LayoutTests/http/tests/security/cross-frame-access-history-prototype-expected.txt View 1 chunk +0 lines, -2 lines 0 comments Download
D LayoutTests/http/tests/security/cross-frame-access-history-put.html View 1 chunk +0 lines, -56 lines 0 comments Download
D LayoutTests/http/tests/security/cross-frame-access-history-put-expected.txt View 1 chunk +0 lines, -22 lines 0 comments Download
M LayoutTests/http/tests/security/cross-frame-access-object-getPrototypeOf.html View 2 chunks +1 line, -2 lines 0 comments Download
M LayoutTests/http/tests/security/cross-frame-access-object-getPrototypeOf-expected.txt View 1 chunk +1 line, -3 lines 0 comments Download
D LayoutTests/platform/chromium-mac/http/tests/history/cross-origin-replace-history-object-child-expected.txt View 1 2 3 1 chunk +0 lines, -7 lines 0 comments Download
M Source/core/page/DOMWindow.idl View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/core/page/History.idl View 1 chunk +4 lines, -9 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
Mike West
Hi Adam and Eric. I've ported over Adam's stab at a patch to deny cross-origin ...
7 years, 7 months ago (2013-05-01 04:08:21 UTC) #1
eseidel
Seems reasonable to me. https://codereview.chromium.org/14198015/diff/7001/LayoutTests/fast/frames/sandboxed-iframe-history-denied-expected.txt File LayoutTests/fast/frames/sandboxed-iframe-history-denied-expected.txt (right): https://codereview.chromium.org/14198015/diff/7001/LayoutTests/fast/frames/sandboxed-iframe-history-denied-expected.txt#newcode1 LayoutTests/fast/frames/sandboxed-iframe-history-denied-expected.txt:1: CONSOLE MESSAGE: Sandbox access violation: ...
7 years, 7 months ago (2013-05-01 04:17:23 UTC) #2
Use mkwst_at_chromium.org plz.
Thanks, Eric. https://codereview.chromium.org/14198015/diff/7001/LayoutTests/fast/frames/sandboxed-iframe-history-denied-expected.txt File LayoutTests/fast/frames/sandboxed-iframe-history-denied-expected.txt (right): https://codereview.chromium.org/14198015/diff/7001/LayoutTests/fast/frames/sandboxed-iframe-history-denied-expected.txt#newcode1 LayoutTests/fast/frames/sandboxed-iframe-history-denied-expected.txt:1: CONSOLE MESSAGE: Sandbox access violation: Blocked a ...
7 years, 7 months ago (2013-05-01 04:45:18 UTC) #3
Use mkwst_at_chromium.org plz.
https://codereview.chromium.org/14198015/diff/7001/LayoutTests/http/tests/security/cross-frame-access-getOwnPropertyDescriptor-expected.txt File LayoutTests/http/tests/security/cross-frame-access-getOwnPropertyDescriptor-expected.txt (right): https://codereview.chromium.org/14198015/diff/7001/LayoutTests/http/tests/security/cross-frame-access-getOwnPropertyDescriptor-expected.txt#newcode355 LayoutTests/http/tests/security/cross-frame-access-getOwnPropertyDescriptor-expected.txt:355: *** FAIL: canGetDescriptor(targetWindow, 'length') should be 'false' but instead ...
7 years, 7 months ago (2013-05-01 04:50:23 UTC) #4
abarth-chromium
LGTM There's likely some more code you can remove. For example, the V8History clause in ...
7 years, 7 months ago (2013-05-06 16:49:58 UTC) #5
abarth-chromium
https://codereview.chromium.org/14198015/diff/7005/Source/core/page/History.idl File Source/core/page/History.idl (left): https://codereview.chromium.org/14198015/diff/7005/Source/core/page/History.idl#oldcode30 Source/core/page/History.idl:30: CustomEnumerateProperty, I would have expected that we'd need to ...
7 years, 7 months ago (2013-05-06 16:51:00 UTC) #6
Mike West
On 2013/05/06 16:49:58, abarth wrote: > LGTM > > There's likely some more code you ...
7 years, 7 months ago (2013-05-06 17:59:53 UTC) #7
abarth-chromium
Might as well try to land this CL and iterate in a followup CL.
7 years, 7 months ago (2013-05-06 19:43:49 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mkwst@chromium.org/14198015/7005
7 years, 7 months ago (2013-05-06 19:44:07 UTC) #9
commit-bot: I haz the power
Retried try job too often on linux_layout_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_layout_rel&number=6896
7 years, 7 months ago (2013-05-06 20:23:57 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mkwst@chromium.org/14198015/25001
7 years, 7 months ago (2013-05-07 03:38:41 UTC) #11
commit-bot: I haz the power
7 years, 7 months ago (2013-05-07 04:03:34 UTC) #12
Message was sent while issue was closed.
Change committed as 149846

Powered by Google App Engine
This is Rietveld 408576698