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

Issue 2439013002: Implement cross-origin attributes using access check interceptors. (Closed)

Created:
4 years, 2 months ago by dcheng
Modified:
4 years ago
CC:
blink-reviews, blink-reviews-bindings_chromium.org, chromium-reviews, site-isolation-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Patch Set 1 #

Patch Set 2 : Various things #

Patch Set 3 : Attributes, sort of #

Total comments: 3

Patch Set 4 : rebase #

Patch Set 5 : Set internal pointers on global proxy #

Patch Set 6 : Rebase #

Patch Set 7 : Fix all the things. #

Patch Set 8 : . #

Total comments: 27

Patch Set 9 : Address feedback and fix cross-origin location set #

Total comments: 1

Patch Set 10 : Documentation and missing file. #

Total comments: 4

Patch Set 11 : Remove TODOs from templates, add checks to bindings generator #

Patch Set 12 : rebase #

Patch Set 13 : Remove ScriptState workaround #

Patch Set 14 : Revert to using the origin-safe method getters/setters to try to fix postMessage... #

Total comments: 1

Patch Set 15 : rebase #

Patch Set 16 : . #

Patch Set 17 : Still broken #

Patch Set 18 : Exceptions, maybe #

Patch Set 19 : . #

Patch Set 20 : etc2 #

Total comments: 6

Patch Set 21 : Clean up named enumerator interceptor. #

Total comments: 46

Patch Set 22 : Address comments, use non-deprecated ExceptionState ctor #

Patch Set 23 : rebase? #

Patch Set 24 : add some comments #

Patch Set 25 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+509 lines, -188 lines) Patch
M third_party/WebKit/LayoutTests/http/tests/security/cross-frame-access-enumeration-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/cross-frame-access-put-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/cross-frame-access-set-window-properties-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/cross-origin-window-open-exception-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/w3c/cross-origin-objects-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/IDLExtendedAttributes.md View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +88 lines, -22 lines 0 comments Download
M third_party/WebKit/Source/bindings/IDLExtendedAttributes.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/bindings.gni View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/BindingSecurity.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2 chunks +20 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/bindings/core/v8/V8CrossOriginSetterInfo.h View 1 2 3 4 5 6 7 8 9 1 chunk +39 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +1 line, -11 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +8 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/bindings/scripts/v8_attributes.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 5 chunks +25 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/bindings/scripts/v8_interface.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 5 chunks +37 lines, -17 lines 0 comments Download
M third_party/WebKit/Source/bindings/scripts/v8_methods.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 5 chunks +10 lines, -22 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +5 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 5 chunks +9 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 5 chunks +129 lines, -25 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/idls/core/TestInterface.idl View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceCheckSecurity.idl View 1 2 3 4 5 6 1 chunk +7 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCheckSecurity.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 7 chunks +93 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/core/frame/DOMWindow.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/frame/Location.idl View 1 2 3 4 5 6 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/frame/Window.idl View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 4 chunks +16 lines, -16 lines 0 comments Download

Messages

Total messages: 95 (39 generated)
dcheng
This CL isn't complete, but I wanted to get some general thoughts on the direction ...
4 years, 1 month ago (2016-10-24 07:56:38 UTC) #3
dcheng
On 2016/10/24 07:56:38, dcheng wrote: > 3) After I migrated to the bindings generator, things ...
4 years, 1 month ago (2016-10-24 08:12:49 UTC) #4
haraken
On 2016/10/24 07:56:38, dcheng wrote: > This CL isn't complete, but I wanted to get ...
4 years, 1 month ago (2016-10-24 09:18:16 UTC) #6
haraken
On 2016/10/24 08:12:49, dcheng wrote: > On 2016/10/24 07:56:38, dcheng wrote: > > 3) After ...
4 years, 1 month ago (2016-10-24 09:22:23 UTC) #7
Yuki
On 2016/10/24 09:22:23, haraken wrote: > On 2016/10/24 08:12:49, dcheng wrote: > > On 2016/10/24 ...
4 years, 1 month ago (2016-10-24 09:50:38 UTC) #8
haraken
On 2016/10/24 09:50:38, Yuki wrote: > On 2016/10/24 09:22:23, haraken wrote: > > On 2016/10/24 ...
4 years, 1 month ago (2016-10-24 09:54:14 UTC) #9
Yuki
On 2016/10/24 09:54:14, haraken wrote: > On 2016/10/24 09:50:38, Yuki wrote: > > On 2016/10/24 ...
4 years, 1 month ago (2016-10-24 09:57:36 UTC) #10
jochen (gone - plz use gerrit)
On 2016/10/24 at 09:18:16, haraken wrote: > On 2016/10/24 07:56:38, dcheng wrote: > > This ...
4 years, 1 month ago (2016-10-24 11:16:33 UTC) #11
dcheng
> > > > Just to confirm: > > > > > > > > ...
4 years, 1 month ago (2016-10-24 15:25:41 UTC) #12
haraken
On 2016/10/24 15:25:41, dcheng wrote: > > > > > Just to confirm: > > ...
4 years, 1 month ago (2016-10-24 18:12:26 UTC) #13
dcheng
On 2016/10/24 18:12:26, haraken wrote: > On 2016/10/24 15:25:41, dcheng wrote: > > > > ...
4 years, 1 month ago (2016-10-24 18:15:32 UTC) #14
haraken
On 2016/10/24 18:15:32, dcheng wrote: > On 2016/10/24 18:12:26, haraken wrote: > > On 2016/10/24 ...
4 years, 1 month ago (2016-10-24 18:18:49 UTC) #15
dcheng
PTAL. Unfortunately, jochen's v8 change (https://bugs.chromium.org/p/v8/issues/detail?id=5588) was reverted, so I can't send this through the ...
4 years, 1 month ago (2016-11-02 01:46:42 UTC) #17
haraken
Overall looks good. This CL is doing multiple things in one go -- would it ...
4 years, 1 month ago (2016-11-02 04:30:32 UTC) #18
dcheng
I'm currently working on updating the docs, but sending out the updated CL first. https://codereview.chromium.org/2439013002/diff/160001/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp ...
4 years, 1 month ago (2016-11-02 07:45:32 UTC) #19
Yuki
Could you upload V8CrossOriginSetterInfo.h, too? Looks good overall. https://codereview.chromium.org/2439013002/diff/160001/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp File third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp (right): https://codereview.chromium.org/2439013002/diff/160001/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp#newcode120 third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp:120: // ...
4 years, 1 month ago (2016-11-02 08:26:39 UTC) #20
dcheng
Oops, added the missing file. Also updated the markdown for CheckSecurity and CrossOrigin, but there ...
4 years, 1 month ago (2016-11-02 09:07:42 UTC) #21
dcheng
(I will address the remaining comments tomorrow morning.)
4 years, 1 month ago (2016-11-02 09:10:23 UTC) #22
Yuki
https://codereview.chromium.org/2439013002/diff/200001/third_party/WebKit/Source/bindings/IDLExtendedAttributes.md File third_party/WebKit/Source/bindings/IDLExtendedAttributes.md (right): https://codereview.chromium.org/2439013002/diff/200001/third_party/WebKit/Source/bindings/IDLExtendedAttributes.md#newcode1414 third_party/WebKit/Source/bindings/IDLExtendedAttributes.md:1414: all methods of an interface. The security check verifies ...
4 years, 1 month ago (2016-11-02 09:43:49 UTC) #23
haraken
I'm just curious but is this CL going to change some web-exposed behavior? In particular, ...
4 years, 1 month ago (2016-11-02 12:15:50 UTC) #24
dcheng
I haven't removed jochen's temporary hack in ScriptState yet, because I'm trying to figure out ...
4 years, 1 month ago (2016-11-03 07:44:45 UTC) #25
dcheng
(Please ignore trybot failures, I thought v8 had rolled to include jochen's latest patch)
4 years, 1 month ago (2016-11-03 08:17:52 UTC) #28
blink-reviews
Replied inline. 2016-11-03 16:44 GMT+09:00 <dcheng@chromium.org>: > I haven't removed jochen's temporary hack in ScriptState ...
4 years, 1 month ago (2016-11-07 03:58:18 UTC) #39
chromium-reviews
Replied inline. 2016-11-03 16:44 GMT+09:00 <dcheng@chromium.org>: > I haven't removed jochen's temporary hack in ScriptState ...
4 years, 1 month ago (2016-11-07 03:58:18 UTC) #40
Yuki
https://codereview.chromium.org/2439013002/diff/160001/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceCheckSecurity.idl File third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceCheckSecurity.idl (right): https://codereview.chromium.org/2439013002/diff/160001/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceCheckSecurity.idl#newcode43 third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceCheckSecurity.idl:43: [CrossOrigin, PerWorldBindings] void doNotCheckSecurityPerWorldBindingsVoidMethod(); On 2016/11/03 07:44:45, dcheng wrote: ...
4 years, 1 month ago (2016-11-07 05:02:42 UTC) #41
jochen (gone - plz use gerrit)
https://codereview.chromium.org/2439013002/diff/280001/third_party/WebKit/Source/core/frame/Location.idl File third_party/WebKit/Source/core/frame/Location.idl (right): https://codereview.chromium.org/2439013002/diff/280001/third_party/WebKit/Source/core/frame/Location.idl#newcode55 third_party/WebKit/Source/core/frame/Location.idl:55: [SetterCallWith=(CurrentWindow,EnteredWindow), RaisesException=Setter] attribute DOMString protocol; I think you'll need ...
4 years, 1 month ago (2016-11-12 23:42:28 UTC) #42
jochen (gone - plz use gerrit)
Daniel, you mentioned some problem with calling vs current window, but hangout ate my chat ...
4 years, 1 month ago (2016-11-12 23:44:51 UTC) #43
dcheng
On 2016/11/12 23:44:51, jochen (travelling til Nov 18) wrote: > Daniel, you mentioned some problem ...
4 years, 1 month ago (2016-11-13 00:11:43 UTC) #44
jochen (gone - plz use gerrit)
so whatever disabled assigning to the origin before was not based on cross-origin checks I ...
4 years, 1 month ago (2016-11-13 01:29:24 UTC) #45
jochen (gone - plz use gerrit)
I guess Frame::canNavigate is supposed to handle this. will debug more.
4 years, 1 month ago (2016-11-13 01:36:40 UTC) #46
dcheng
On 2016/11/13 01:36:40, jochen (travelling til Nov 18) wrote: > I guess Frame::canNavigate is supposed ...
4 years, 1 month ago (2016-11-13 02:06:15 UTC) #47
jochen (gone - plz use gerrit)
I think the difference is that V8LocationMethods now contains "assign", but it should still be ...
4 years, 1 month ago (2016-11-13 06:01:44 UTC) #48
dcheng
PTAL. I had to implement enumerator support as well, but this should be pretty close. ...
4 years ago (2016-12-07 08:19:08 UTC) #57
Yuki
To me, the CL looks good in general. https://codereview.chromium.org/2439013002/diff/400001/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl File third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl (right): https://codereview.chromium.org/2439013002/diff/400001/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl#newcode294 third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl:294: toV8SequenceInternal( ...
4 years ago (2016-12-07 12:03:41 UTC) #58
jochen (gone - plz use gerrit)
I haven't found enough time today to wrap my head around the CL, sorry. Will ...
4 years ago (2016-12-07 15:40:12 UTC) #59
haraken
Mostly LG. https://codereview.chromium.org/2439013002/diff/420001/third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp File third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp (right): https://codereview.chromium.org/2439013002/diff/420001/third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp#newcode237 third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp:237: ExceptionState exceptionState(ExceptionState::UnknownContext, 0, 0, On 2016/12/07 12:03:40, ...
4 years ago (2016-12-08 08:21:02 UTC) #60
dcheng
https://codereview.chromium.org/2439013002/diff/420001/third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp File third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp (right): https://codereview.chromium.org/2439013002/diff/420001/third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp#newcode237 third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp:237: ExceptionState exceptionState(ExceptionState::UnknownContext, 0, 0, On 2016/12/08 08:21:02, haraken wrote: ...
4 years ago (2016-12-08 09:04:11 UTC) #61
haraken
LGTM https://codereview.chromium.org/2439013002/diff/420001/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl File third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl (right): https://codereview.chromium.org/2439013002/diff/420001/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl#newcode199 third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl:199: return false; // the frame is gone. On ...
4 years ago (2016-12-09 02:26:56 UTC) #70
dcheng
https://codereview.chromium.org/2439013002/diff/420001/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl File third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl (right): https://codereview.chromium.org/2439013002/diff/420001/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl#newcode199 third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl:199: return false; // the frame is gone. On 2016/12/09 ...
4 years ago (2016-12-09 05:06:14 UTC) #71
haraken
Still LGTM
4 years ago (2016-12-09 05:48:18 UTC) #72
Yuki
https://codereview.chromium.org/2439013002/diff/420001/third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp File third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp (right): https://codereview.chromium.org/2439013002/diff/420001/third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp#newcode237 third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp:237: ExceptionState exceptionState(ExceptionState::UnknownContext, 0, 0, On 2016/12/08 09:04:10, dcheng wrote: ...
4 years ago (2016-12-09 07:02:49 UTC) #73
dcheng
https://codereview.chromium.org/2439013002/diff/420001/third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp File third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp (right): https://codereview.chromium.org/2439013002/diff/420001/third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp#newcode237 third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp:237: ExceptionState exceptionState(ExceptionState::UnknownContext, 0, 0, On 2016/12/09 07:02:49, Yuki wrote: ...
4 years ago (2016-12-09 07:35:20 UTC) #74
Yuki
LGTM. https://codereview.chromium.org/2439013002/diff/420001/third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl File third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl (right): https://codereview.chromium.org/2439013002/diff/420001/third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl#newcode492 third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl:492: v8 doesn't support querying the incumbent context. For ...
4 years ago (2016-12-09 08:40:23 UTC) #75
jochen (gone - plz use gerrit)
rubberstamp lgtm
4 years ago (2016-12-09 08:41:30 UTC) #76
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2439013002/500001
4 years ago (2016-12-09 08:44:22 UTC) #79
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/322417)
4 years ago (2016-12-09 08:52:12 UTC) #81
dcheng
On 2016/12/09 08:52:12, commit-bot: I haz the power wrote: > Try jobs failed on following ...
4 years ago (2016-12-09 08:56:00 UTC) #82
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2439013002/500001
4 years ago (2016-12-09 09:30:19 UTC) #84
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/322428)
4 years ago (2016-12-09 09:37:42 UTC) #86
jochen (gone - plz use gerrit)
does git cl presubmit work locally?
4 years ago (2016-12-09 15:12:42 UTC) #87
Yuki
On 2016/12/09 15:12:42, jochen wrote: > does git cl presubmit work locally? I think we're ...
4 years ago (2016-12-09 15:16:29 UTC) #88
Yuki
On 2016/12/09 15:16:29, Yuki wrote: > On 2016/12/09 15:12:42, jochen wrote: > > does git ...
4 years ago (2016-12-09 15:20:33 UTC) #89
dcheng
On 2016/12/09 15:20:33, Yuki wrote: > On 2016/12/09 15:16:29, Yuki wrote: > > On 2016/12/09 ...
4 years ago (2016-12-09 16:16:44 UTC) #90
dcheng
On 2016/12/09 15:12:42, jochen wrote: > does git cl presubmit work locally? It does, but ...
4 years ago (2016-12-09 16:18:52 UTC) #91
commit-bot: I haz the power
Patchset 25 (id:??) landed as https://crrev.com/3387c1777b355f2da7a02ad1fc833745f0589915 Cr-Commit-Position: refs/heads/master@{#437554}
4 years ago (2016-12-09 16:22:24 UTC) #93
dcheng
4 years ago (2016-12-09 16:24:10 UTC) #95
Message was sent while issue was closed.
Committed patchset #25 (id:500001) manually as
3387c1777b355f2da7a02ad1fc833745f0589915 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698