WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
53424
Don't manually set user gesture in HTMLAnchorElement's click handle.
https://bugs.webkit.org/show_bug.cgi?id=53424
Summary
Don't manually set user gesture in HTMLAnchorElement's click handle.
Johnny(Jianning) Ding
Reported
2011-01-31 08:14:20 PST
Currently, WebKit manually sets user gesture in HTMLAnchorElement's click handle. (HTMLAnchorElement.cpp, line 555). There is a FIXME comment in line 554 and says "This seems wrong. Why are we manufactuing a user gesture?". Yes, current behavior is wrong. With it, people can create custom events to force to open popup windows without real use gesture. See the following code which forces to pop up new window without user gesture. (copy from
http://crbug.com/71167
) <A id=test href="javascript:window.open('
http://www.google.com','','height=200,width=200
')" target=_blank>test</A> <SCRIPT> oClickEvent = document.createEvent("MouseEvents"); oClickEvent.initEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); document.getElementById("test").dispatchEvent(oClickEvent); </SCRIPT> The current behavior was added in
r20813
<
http://trac.webkit.org/changeset/20813
>, I don't think we need to keep this logic now. Will remove the logic of setting user gesture in HTMLAnchorElement's click handle and add a test for regression.
Attachments
patch v1
(4.16 KB, patch)
2011-02-01 01:35 PST
,
Johnny(Jianning) Ding
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Johnny(Jianning) Ding
Comment 1
2011-02-01 01:35:57 PST
Created
attachment 80729
[details]
patch v1
WebKit Commit Bot
Comment 2
2011-02-01 15:52:40 PST
Comment on
attachment 80729
[details]
patch v1 Clearing flags on attachment: 80729 Committed
r77329
: <
http://trac.webkit.org/changeset/77329
>
WebKit Commit Bot
Comment 3
2011-02-01 15:52:45 PST
All reviewed patches have been landed. Closing bug.
Chris Evans
Comment 4
2011-03-10 00:04:44 PST
This is also CVE-2011-1194; see
https://bugs.webkit.org/show_bug.cgi?id=53244
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug