RESOLVED FIXED 53440
Allow access if security origin access is asked for is the same to the this
https://bugs.webkit.org/show_bug.cgi?id=53440
Summary Allow access if security origin access is asked for is the same to the this
anton muhin
Reported 2011-01-31 11:12:07 PST
Allow access if security origin access is asked for is the same to the this
Attachments
Patch (1.22 KB, patch)
2011-01-31 11:22 PST, anton muhin
no flags
Patch (1.22 KB, patch)
2011-01-31 12:15 PST, anton muhin
no flags
anton muhin
Comment 1 2011-01-31 11:22:32 PST
Adam Barth
Comment 2 2011-01-31 11:24:49 PST
Comment on attachment 80664 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=80664&action=review > Source/WebCore/ChangeLog:5 > + Allow access if security origin access is asked for is the same to the this "is the same to the this" => "is the same as this" ? > Source/WebCore/ChangeLog:8 > + Covered by the existing tests. How is this covered by existing tests if none of the tests changed as a result of this patch?
anton muhin
Comment 3 2011-01-31 11:29:01 PST
(In reply to comment #2) > (From update of attachment 80664 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=80664&action=review > > > Source/WebCore/ChangeLog:5 > > + Allow access if security origin access is asked for is the same to the this > > "is the same to the this" > => "is the same as this" ? Done. > > > Source/WebCore/ChangeLog:8 > > + Covered by the existing tests. > > How is this covered by existing tests if none of the tests changed as a result of this patch? I mean that nothing started to break with this change. Does that make sense? If not, may you suggest how I can reword this phrase? And I am afraid it'd be pretty much difficult to write a test which will trigger this path right now.
Adam Barth
Comment 4 2011-01-31 11:33:39 PST
Yeah, I don't think it's possible to trigger that branch now. We should just say that in the ChangeLog. To give folks reading this bug more context, Anton and I have been discussing adding some defense-in-depth security checks at various points in the bindings. Those points have SecurityOrigin objects, but not necessarily DOMWindow objects. Currently, the "you can always access yourself" check is done by comparing DOMWindows. Adding this branch here is redundant today, but won't be redundant in the future once we add these extra checks.
anton muhin
Comment 5 2011-01-31 12:15:17 PST
anton muhin
Comment 6 2011-01-31 12:15:54 PST
Adam, may you have another look? (In reply to comment #5) > Created an attachment (id=80669) [details] > Patch
Sam Weinig
Comment 7 2011-01-31 12:47:05 PST
(In reply to comment #4) > Yeah, I don't think it's possible to trigger that branch now. We should just say that in the ChangeLog. > > To give folks reading this bug more context, Anton and I have been discussing adding some defense-in-depth security checks at various points in the bindings. Those points have SecurityOrigin objects, but not necessarily DOMWindow objects. Currently, the "you can always access yourself" check is done by comparing DOMWindows. Adding this branch here is redundant today, but won't be redundant in the future once we add these extra checks. Can we remove some of the DOMWindow comparing to themselves checks then?
Adam Barth
Comment 8 2011-01-31 14:02:02 PST
> Can we remove some of the DOMWindow comparing to themselves checks then? That's a good idea. We should be able to remove them after/in this patch.
anton muhin
Comment 9 2011-02-01 04:39:42 PST
Guys, if you're fine with this patch, may I ask you to r+ it? (In reply to comment #8) > > Can we remove some of the DOMWindow comparing to themselves checks then? > > That's a good idea. We should be able to remove them after/in this patch.
Adam Barth
Comment 10 2011-02-01 11:28:16 PST
Comment on attachment 80669 [details] Patch Sure. I think a followup patch to remove the DOMWindow equality comparison might be worth doing too.
anton muhin
Comment 11 2011-02-01 11:34:35 PST
Comment on attachment 80669 [details] Patch Thanks a lot, Adam. I'll try to do further cleanup with a separate patch.
WebKit Commit Bot
Comment 12 2011-02-01 12:27:13 PST
Comment on attachment 80669 [details] Patch Clearing flags on attachment: 80669 Committed r77272: <http://trac.webkit.org/changeset/77272>
WebKit Commit Bot
Comment 13 2011-02-01 12:27:20 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.