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

Issue 2683583003: Bindings: perform security check before downcasting to LocalDOMWindow. (Closed)

Created:
3 years, 10 months ago by dcheng
Modified:
3 years, 10 months ago
Reviewers:
haraken, esprehn, Yuki
CC:
blink-reviews, blink-reviews-bindings_chromium.org, chromium-reviews, kinuko+watch
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Bindings: perform security check before downcasting to LocalDOMWindow. Certain callbacks can be reached after the browsing context has been navigated. In those instances, it's important to do the security check before downcasting, since the normal security check on the holder object won't be used. BUG=689243 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Review-Url: https://codereview.chromium.org/2683583003 Cr-Commit-Position: refs/heads/master@{#448915} Committed: https://chromium.googlesource.com/chromium/src/+/ae9143a9d87c734f5b31f72f296917cc8bc24588

Patch Set 1 #

Total comments: 5

Patch Set 2 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+81 lines, -11 lines) Patch
M third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl View 1 3 chunks +30 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl View 1 2 chunks +16 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebFrameTest.cpp View 2 chunks +35 lines, -1 line 0 comments Download

Messages

Total messages: 24 (14 generated)
dcheng
Not the nicest patch, but I couldn't think of a better alternative.
3 years, 10 months ago (2017-02-07 10:15:14 UTC) #2
haraken
LGTM https://codereview.chromium.org/2683583003/diff/1/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl File third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl (right): https://codereview.chromium.org/2683583003/diff/1/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl#newcode48 third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl:48: {% if not attribute.is_check_security_for_receiver %} Can we avoid ...
3 years, 10 months ago (2017-02-07 15:43:13 UTC) #7
dcheng
https://codereview.chromium.org/2683583003/diff/1/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl File third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl (right): https://codereview.chromium.org/2683583003/diff/1/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl#newcode48 third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl:48: {% if not attribute.is_check_security_for_receiver %} On 2017/02/07 15:43:13, haraken ...
3 years, 10 months ago (2017-02-08 01:30:25 UTC) #8
haraken
On 2017/02/08 01:30:25, dcheng wrote: > https://codereview.chromium.org/2683583003/diff/1/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl > File third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl (right): > > https://codereview.chromium.org/2683583003/diff/1/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl#newcode48 > ...
3 years, 10 months ago (2017-02-08 01:42:18 UTC) #12
dcheng
Going to try CQing even though linux_site_isolation is red... the test passes locally on my ...
3 years, 10 months ago (2017-02-08 04:51:13 UTC) #15
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/2683583003/20001
3 years, 10 months ago (2017-02-08 04:51:38 UTC) #17
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/ae9143a9d87c734f5b31f72f296917cc8bc24588
3 years, 10 months ago (2017-02-08 05:51:24 UTC) #20
esprehn
Is this putting a call to BindingSecurity::shouldAllowAccessTo(currentDOMWindow inside every window function? shouldAllowAccessTo is actually pretty ...
3 years, 10 months ago (2017-02-08 06:13:41 UTC) #22
dcheng
On 2017/02/08 06:13:41, esprehn wrote: > Is this putting a call to BindingSecurity::shouldAllowAccessTo(currentDOMWindow > inside ...
3 years, 10 months ago (2017-02-08 07:22:36 UTC) #23
Yuki
3 years, 10 months ago (2017-02-14 06:11:50 UTC) #24
Message was sent while issue was closed.
LGTM.

Powered by Google App Engine
This is Rietveld 408576698