<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>47593</bug_id>
          
          <creation_ts>2010-10-13 07:22:07 -0700</creation_ts>
          <short_desc>Require a user gesture to open the file dialog</short_desc>
          <delta_ts>2011-12-30 04:21:50 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>55102</blocked>
    
    <blocked>55110</blocked>
    
    <blocked>55104</blocked>
          <everconfirmed>0</everconfirmed>
          <reporter name="Johnny(Jianning) Ding">jnd</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>aestes</cc>
    
    <cc>ap</cc>
    
    <cc>darin</cc>
    
    <cc>inferno</cc>
    
    <cc>j</cc>
    
    <cc>jschuh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>293419</commentid>
    <comment_count>0</comment_count>
    <who name="Johnny(Jianning) Ding">jnd</who>
    <bug_when>2010-10-13 07:22:07 -0700</bug_when>
    <thetext>&lt;Input type=file&gt; is represented as a file upload control in WebKit, it is a sensitive control since it can access users&apos; local file(s). 
So ideally browser should only allow doing the file choosing behavior via user gesture, but so far only Firefox does.(Please refer to http://mxr.mozilla.org/mozilla/source/content/html/content/src/nsHTMLInputElement.cpp#1413)
A chromium bug(http://crbug.com/58319) is related to this bug.

For example, when running the following code, there is no file select dialog only in Firefox, other main-stream browsers show the file dialog.
&lt;input type=&quot;file&quot; id=&quot;f&quot;&gt;
&lt;script&gt;setTimeout(&quot;document.getElementById(&apos;f&apos;).click();&quot;, 1);&lt;/script&gt;

I suggest requiring a user gesture to open the file dialog in WebKit like Firefox does

To do this, there are two ways.
1) Only direct user gesture event can open the file dialog. The direct user gesture event(key/mouse) means the event must dispatch on the &lt;input type=file&gt;, which can ensure the file dialog is opened by users&apos; true intention.
2) The file dialog can be opened as long as a user gesture happens at that time, which means you can open the file dialog in user gesture event dispatched on other elements, which may be more convenient

For example. when running the following code in WebKit, 
&lt;input type=&quot;file&quot; id=&quot;f&quot;&gt;
&lt;a onclick=&quot;document.getElementById(&apos;f&apos;).click();&quot;&gt;click me&lt;/a&gt;

In way 1, clicking the text &quot;click me&quot; will not open the file dialog, but the file dialog does open in way 2.

I personally prefer the way 1, since it&apos;s more safe.

Any suggestions?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>293456</commentid>
    <comment_count>1</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-10-13 09:36:34 -0700</bug_when>
    <thetext>I think either would be fine.  I&apos;d go with the general user gesture approach first, but I don&apos;t feel strongly about it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>293587</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-10-13 12:10:49 -0700</bug_when>
    <thetext>Would that add any safety in the presence of FileReader? A site can read file content from a drop handler.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>293633</commentid>
    <comment_count>3</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-10-13 12:43:12 -0700</bug_when>
    <thetext>The Chromium bug is marked security sensitive because it has exploit details.  The issue is that the web site can spam the user with file picker dialogs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>293637</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-10-13 12:48:45 -0700</bug_when>
    <thetext>&gt; The Chromium bug is marked security sensitive because it has exploit details.

I can&apos;t see the Chromium bug.

&gt; The issue is that the web site can spam the user with file picker dialogs.

Is this different from spamming with alerts, confirms or modal dialogs?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>293643</commentid>
    <comment_count>5</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-10-13 12:54:16 -0700</bug_when>
    <thetext>&gt; &gt; The issue is that the web site can spam the user with file picker dialogs.
&gt; 
&gt; Is this different from spamming with alerts, confirms or modal dialogs?

Yes.  For two reasons: (1) we have mitigations in place for all of those and (2) the file picker is non-modal.

Requiring a user gesture here matches Firefox as well.  We plan to put in other mitigations at the browser level, but this one seems worth doing at the WebCore level.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>294055</commentid>
    <comment_count>6</comment_count>
      <attachid>70727</attachid>
    <who name="Johnny(Jianning) Ding">jnd</who>
    <bug_when>2010-10-14 05:07:46 -0700</bug_when>
    <thetext>Created attachment 70727
patch v1

Thanks for comments! 
Patch V1 is ready.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>295037</commentid>
    <comment_count>7</comment_count>
    <who name="Abhishek Arya">inferno</who>
    <bug_when>2010-10-15 17:26:58 -0700</bug_when>
    <thetext>Adam, can you please review.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>295051</commentid>
    <comment_count>8</comment_count>
      <attachid>70727</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-10-15 17:38:53 -0700</bug_when>
    <thetext>Comment on attachment 70727
patch v1

View in context: https://bugs.webkit.org/attachment.cgi?id=70727&amp;action=review

&gt; WebCore/rendering/RenderFileUploadControl.cpp:128
&gt; +    if (!(frame() &amp;&amp; frame()-&gt;loader()-&gt;isProcessingUserGesture()))

We usually say !frame() || !frame() ...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>295062</commentid>
    <comment_count>9</comment_count>
    <who name="Abhishek Arya">inferno</who>
    <bug_when>2010-10-15 17:51:49 -0700</bug_when>
    <thetext>Thanks a lot Adam for the quick response.

Johnny, i can fix the style nit and commit it for you ? Also, did anyone nominate you for committer access yet ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>295130</commentid>
    <comment_count>10</comment_count>
    <who name="Johnny(Jianning) Ding">jnd</who>
    <bug_when>2010-10-16 07:46:09 -0700</bug_when>
    <thetext>(In reply to comment #9)
&gt; Thanks a lot Adam for the quick response.
&gt; 
&gt; Johnny, i can fix the style nit and commit it for you ? Also, did anyone nominate you for committer access yet ?

Abhishek, please help me fix the nit and land it. Thanks very much for the helps from you and Adam!

So far no-body nominated me for committer yet.
I have 10+ changes on WebKit, you can refer to them from 
http://trac.webkit.org/search?q=jnd%40chromium&amp;noquickjump=1&amp;changeset=on
http://trac.webkit.org/search?q=johnnyding.webkit%40gmail.com&amp;noquickjump=1&amp;changeset=on</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>295151</commentid>
    <comment_count>11</comment_count>
    <who name="Abhishek Arya">inferno</who>
    <bug_when>2010-10-16 09:48:30 -0700</bug_when>
    <thetext>Committed r69914: &lt;http://trac.webkit.org/changeset/69914&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>355652</commentid>
    <comment_count>12</comment_count>
    <who name="Andy Estes">aestes</who>
    <bug_when>2011-02-22 15:26:52 -0800</bug_when>
    <thetext>(In reply to comment #5)
&gt; &gt; &gt; The issue is that the web site can spam the user with file picker dialogs.
&gt; &gt; 
&gt; &gt; Is this different from spamming with alerts, confirms or modal dialogs?
&gt; 
&gt; Requiring a user gesture here matches Firefox as well.  We plan to put in other mitigations at the browser level, but this one seems worth doing at the WebCore level.

Interestingly, this will no longer be true in Firefox 4. They now allow .click() to be called programmatically on input elements (see &lt;https://bugzilla.mozilla.org/show_bug.cgi?id=61098&gt;) without an underlying user gesture. IE also allows this.

I think we should revert this change. It makes us incompatible with other major engines and with at least one major JavaScript framework that I&apos;m aware of (SproutCore), which I think outweighs the benefits of mitigating file chooser spamming.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>355653</commentid>
    <comment_count>13</comment_count>
    <who name="Andy Estes">aestes</who>
    <bug_when>2011-02-22 15:30:36 -0800</bug_when>
    <thetext>I will note that from reading the mozilla bug it seems like Firefox has mitigation against creating modal dialogs in a loop, which they apply to file chooser dialogs as well. I&apos;m not sure if we do something similar. This is the type of exploit they wish to avoid (copied from the bug):

myFileControl = doc.getElementById(&apos;file&apos;);
do {
  myFileControl.click();
} while (!fileContainsDirectionsToSecretVolcanoLair(myFileControl.files[0]));</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>355877</commentid>
    <comment_count>14</comment_count>
    <who name="Johnny(Jianning) Ding">jnd</who>
    <bug_when>2011-02-22 22:33:55 -0800</bug_when>
    <thetext>(In reply to comment #13)
&gt; I will note that from reading the mozilla bug it seems like Firefox has mitigation against creating modal dialogs in a loop, which they apply to file chooser dialogs as well. I&apos;m not sure if we do something similar. This is the type of exploit they wish to avoid (copied from the bug):
&gt; 
&gt; myFileControl = doc.getElementById(&apos;file&apos;);
&gt; do {
&gt;   myFileControl.click();
&gt; } while (!fileContainsDirectionsToSecretVolcanoLair(myFileControl.files[0]));

Thanks Andy.

After reading mozilla bug https://bugzilla.mozilla.org/show_bug.cgi?id=61098, I think it is to deal with how to avoid creating endless model dialog like alert, like you said it applies to file chooser dialogs as well in Firefox, but this webkit change is to disallow javascript to open the file dialog without user gesture. See the following test.


&lt;input type=button value=&quot;click&quot; onclick=&quot;open_file_dialog()&quot; /&gt;
&lt;input type=file id=&quot;file&quot;&gt;
&lt;script&gt;
function open_file_dialog() {
  while (1) {
    document.getElementById(&quot;file&quot;).click();
  }
}
// try to open a file dialog in load stage.
document.getElementById(&quot;file&quot;).click();
&lt;/script&gt;

In above test, function open_file_dialog opens file dialog in infinite loop.
In Firefox4, when loading the test, there is no file dialog, which is blocked because of no user gesture (we follow it from this webkit bug). When calling the function in user gesture stage, the patch for mozilla bug 61098 can allow only a few file dialogs (model dialog) to be popped up.

I test the following test case in Firefox4 and Safari with enabling popup blocker, they have same behavior. I think we should keep this patch.
Please correct me if I am wrong.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>355901</commentid>
    <comment_count>15</comment_count>
    <who name="Andy Estes">aestes</who>
    <bug_when>2011-02-22 23:28:57 -0800</bug_when>
    <thetext>Hi Johnny,

(In reply to comment #14)
&gt; (In reply to comment #13) 
&gt; After reading mozilla bug https://bugzilla.mozilla.org/show_bug.cgi?id=61098, I think it is to deal with how to avoid creating endless model dialog like alert, like you said it applies to file chooser dialogs as well in Firefox, but this webkit change is to disallow javascript to open the file dialog without user gesture.

Sorry, I linked to the wrong bug. The bug I meant to link to was &lt;https://bugzilla.mozilla.org/show_bug.cgi?id=36619&gt;, which tracks adding a click() method to file input elements. &lt;https://bugzilla.mozilla.org/show_bug.cgi?id=61098&gt; is also relevant here, but wasn&apos;t what I was basing my analysis on.

Firefox 4 integrates their implementation with their pop-up blocker, which (if enabled) allows programatic clicks to open a file picker after user confirmation. We don&apos;t, so such attempts are blocked regardless of the state of our pop-up blocker.

Firefox 4 also allows file pickers even if the programatic click() and the user gesture are separated by a timeout. Take the following test case for example:

&lt;script&gt;
    window.addEventListener(&apos;load&apos;, function() {
        document.getElementById(&apos;the-link&apos;).addEventListener(&apos;click&apos;, function() {
             setTimeout(function() {
                 document.getElementById(&apos;the-file-input&apos;).click();
             },1000);
        }, false);
    }, false);
&lt;/script&gt;
&lt;input id=&quot;the-file-input&quot; type=&quot;file&quot;&gt;
&lt;a id=&apos;the-link&apos; href=&quot;#&quot;&gt;Programatically click the input.&lt;/a&gt;

Firefox 4 will display a file picker one second after clicking &apos;Programatically click the input&apos;; we won&apos;t, again regardless of pop-up blocker state.

There are valid reasons for content authors to programmatically send click events to file input elements via setTimeout() and I think we shouldn&apos;t break those use cases.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>355907</commentid>
    <comment_count>16</comment_count>
    <who name="Andy Estes">aestes</who>
    <bug_when>2011-02-23 00:00:06 -0800</bug_when>
    <thetext>Perhaps timers could remember the user gesture state of the event loop iteration that initiated them, then set the user gesture state accordingly when the timer fires. This would allow the click-via-setTimeout use case without allowing non-gesture-initiated clicks in general. Depending on how careful we want to be we could add protections like only forwarding gestures for timers less than a certain maximum delay and/or only propagating one level deep.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>355966</commentid>
    <comment_count>17</comment_count>
    <who name="Johnny(Jianning) Ding">jnd</who>
    <bug_when>2011-02-23 03:00:09 -0800</bug_when>
    <thetext>(In reply to comment #16)
&gt; Perhaps timers could remember the user gesture state of the event loop iteration that initiated them, then set the user gesture state accordingly when the timer fires. This would allow the click-via-setTimeout use case without allowing non-gesture-initiated clicks in general. Depending on how careful we want to be we could add protections like only forwarding gestures for timers less than a certain maximum delay and/or only propagating one level deep.

I see, looks like a feature for gesture management. Make sense to me for supporting it, but we should avoid contents authors to abuse this feature, I will suggest that only a timer can remember the user gesture state and the new timeouts created inside that timeout can not inherit this gesture.

Adam, what do you think about Andy&apos;s suggestion?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>356513</commentid>
    <comment_count>18</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2011-02-23 16:00:22 -0800</bug_when>
    <thetext>&gt; Adam, what do you think about Andy&apos;s suggestion?

Sounds reasonable.  We might want to check what other browsers do.  The long term solution here is probably to write a spec for all these cases and socialize it with other browser vendors.  Otherwise we&apos;re going to be continually chasing our tail w.r.t. what web sites expect us to do.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>356536</commentid>
    <comment_count>19</comment_count>
    <who name="Andy Estes">aestes</who>
    <bug_when>2011-02-23 16:32:15 -0800</bug_when>
    <thetext>I&apos;ll do a little more research into how Firefox handles the setTimeout() case. I&apos;ll also file new bugs for these enhancements.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>356554</commentid>
    <comment_count>20</comment_count>
    <who name="Andy Estes">aestes</who>
    <bug_when>2011-02-23 16:52:28 -0800</bug_when>
    <thetext>(In reply to comment #19)
&gt; I&apos;ll do a little more research into how Firefox handles the setTimeout() case. I&apos;ll also file new bugs for these enhancements.

I filed &lt;https://bugs.webkit.org/show_bug.cgi?id=55102&gt; and &lt;https://bugs.webkit.org/show_bug.cgi?id=55104&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>356608</commentid>
    <comment_count>21</comment_count>
    <who name="Andy Estes">aestes</who>
    <bug_when>2011-02-23 18:12:12 -0800</bug_when>
    <thetext>Johnny, while looking into this I noticed that the test for this patch passes even if I comment out the early return in RenderFileUploadControl::click(). This isn&apos;t so great :(

I was thinking about how to make this test more obvious, and I think the right thing to do is to have DumpRenderTree implement the UI delegates for the open panel (webView:runOpenPanelForFileButtonWithResultListener:allowMultipleFiles: and webView:runOpenPanelForFileButtonWithResultListener on the Mac) and have them log a message. Layout test expectations could then be based around the presence/absence of this log message.

That technique could be useful for this test as well as for the tests that will be necessary for the two dependent bugs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>356615</commentid>
    <comment_count>22</comment_count>
    <who name="Andy Estes">aestes</who>
    <bug_when>2011-02-23 18:17:07 -0800</bug_when>
    <thetext>(In reply to comment #21)
&gt; Johnny, while looking into this I noticed that the test for this patch passes even if I comment out the early return in RenderFileUploadControl::click(). This isn&apos;t so great :(
&gt; 
&gt; I was thinking about how to make this test more obvious, and I think the right thing to do is to have DumpRenderTree implement the UI delegates for the open panel (webView:runOpenPanelForFileButtonWithResultListener:allowMultipleFiles: and webView:runOpenPanelForFileButtonWithResultListener on the Mac) and have them log a message. Layout test expectations could then be based around the presence/absence of this log message.
&gt; 
&gt; That technique could be useful for this test as well as for the tests that will be necessary for the two dependent bugs.

I filed &lt;https://bugs.webkit.org/show_bug.cgi?id=55110&gt; about this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>528121</commentid>
    <comment_count>23</comment_count>
    <who name="Jon Leighton">j</who>
    <bug_when>2011-12-30 04:21:50 -0800</bug_when>
    <thetext>FWIW, this change causes problems with programmatically adding files in QtWebKit. See https://bugs.webkit.org/show_bug.cgi?id=75385.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>70727</attachid>
            <date>2010-10-14 05:07:46 -0700</date>
            <delta_ts>2010-10-15 17:38:53 -0700</delta_ts>
            <desc>patch v1</desc>
            <filename>patch003.txt</filename>
            <type>text/plain</type>
            <size>5116</size>
            <attacher name="Johnny(Jianning) Ding">jnd</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiA2OTc1NykKKysrIFdlYkNvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBA
IC0xLDMgKzEsMTUgQEAKKzIwMTAtMTAtMTQgIEpvaG5ueSBEaW5nICA8am5kQGNocm9taXVtLm9y
Zz4KKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBSZXF1
aXJlcyBhIHVzZXIgZ2VzdHVyZSB3aGVuIG9wZW5pbmcgZmlsZSBjaG9vc2UgZGlhbG9nLgorICAg
ICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9NDc1OTMKKworICAg
ICAgICBUZXN0OiBmYXN0L2Zvcm1zL2lucHV0LWZpbGUtbm90LW9wZW4td2l0aG91dC1nZXN0dXJl
Lmh0bWwKKworICAgICAgICAqIHJlbmRlcmluZy9SZW5kZXJGaWxlVXBsb2FkQ29udHJvbC5jcHA6
CisgICAgICAgIChXZWJDb3JlOjpSZW5kZXJGa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W5lcigiY2xpY2siLCBmdW5jdGlvbigpIHsgd2luZG93LmNs
aWNrUmVjZWl2ZWQgPSB0cnVlIH0sIHRydWUpOworICAgIHNldFRpbWVvdXQob3BlbkZpbGVEaWFs
b2dXaXRob3V0VXNlckdlc3R1cmUsIDEpOworfQorPC9zY3JpcHQ+Cis8L2hlYWQ+Cis8Ym9keSBz
dHlsZT0ibWFyZ2luOjBweDsgcGFkZGluZzowcHgiIG9ubG9hZD0ic3RhcnRUZXN0KCk7Ij4KKzxm
b3JtPgorPGlucHV0IHR5cGU9ImZpbGUiIG5hbWU9ImZpbGUiIGlkPSJmIj4KKzwvZm9ybT4KK1Ro
aXMgZmlsZSBpcyB0byB0ZXN0IHRoYXQgb3BlbmluZyBmaWxlIGRpYWxvZyByZXF1aXJlcyBhIHVz
ZXIgZ2VzdHVyZS4gUGxlYXNlIHJlZmVyIHRvIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3df
YnVnLmNnaT9pZD00NzU5MyBmb3IgbW9yZSBkZXRhaWxzLjxicj4KK1Rlc3Qgb3BlbmluZyBmaWxl
IGRpYWxvZyB3aXRob3V0IHVzZXIgZ2VzdHVyZSBpcyA8c3BhbiBpZD0ib3Blbl93aXRob3V0X2dl
c3R1cmUiPkZBSUxFRDwvc3Bhbj48YnI+Cis8L2JvZHk+Cis8L2h0bWw+Cg==
</data>
<flag name="review"
          id="60613"
          type_id="1"
          status="+"
          setter="abarth"
    />
          </attachment>
      

    </bug>

</bugzilla>