<?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>14635</bug_id>
          
          <creation_ts>2007-07-17 01:32:35 -0700</creation_ts>
          <short_desc>Uploading file with non-ASCII character in path fails</short_desc>
          <delta_ts>2007-08-13 22:52:38 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Forms</component>
          <version>523.x (Safari 3)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>808caaa4.8ce9.9cd6c799e9f6</reporter>
          <assigned_to name="Alexey Proskuryakov">ap</assigned_to>
          <cc>ap</cc>
    
    <cc>ddkilzer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>4563</commentid>
    <comment_count>0</comment_count>
    <who name="">808caaa4.8ce9.9cd6c799e9f6</who>
    <bug_when>2007-07-17 01:32:35 -0700</bug_when>
    <thetext>With this site(webkit-buglizza), I cannot upload file from my Desktop.
After moving file to somewhere like c:\__sendtemp\, uploading succeeded.

&apos;filename&apos; is full path, and contains UTF8(nonascii) chars.
With some environment directory name &quot;desktop&quot; is localized into nonascii strings.

I don&apos;t know who has responsiblility, or whether we should always send fullpath.

; ===============
; posts
; ===============
POST http://bugs.webkit.org/attachment.cgi HTTP/1.1
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja) AppleWebKit/522.14.1+ (KHTML, like Gecko) Version/3.0.2 Safari/522.13.1
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryAAsdAAJVAApEAA5j
Transfer-Encoding: Chunked
.....

------WebKitFormBoundaryAAsdAAJVAApEAA5j
Content-Disposition: form-data; name=&quot;data&quot;; filename=&quot;C:\Documents and Settings\*****\εγ‘¦€»εβ―εγ°ε₯γεγΝ½test.html.png&quot;
Content-Type: image/png


; ===============
; response
; ===============
HTTP/1.1 411 Length Required
Server: Apache/1.3.33 (Darwin) PHP/4.4.1 mod_ssl/2.8.24 OpenSSL/0.9.7i DAV/1.0.3
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4557</commentid>
    <comment_count>1</comment_count>
    <who name="">808caaa4.8ce9.9cd6c799e9f6</who>
    <bug_when>2007-07-17 02:07:46 -0700</bug_when>
    <thetext>Oh, HTMLFormElement::formData() converts path to current encoding.

At the time above I certainly settled DefaultEncoding as UTF8.
Now I retried with reloaded attachment.cgi while Encoding-&gt;Europian.
Path is converted as below and still uploading failed.

Content-Disposition: form-data; name=&quot;data&quot;; filename=&quot;C:\Documents and Settings\********\&amp;#12487;&amp;#12473;&amp;#12463;&amp;#12488;&amp;#12483;&amp;#12503;\test.txt&quot;

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4550</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-07-17 04:16:48 -0700</bug_when>
    <thetext>I might well be wrong, but I think that a full path is not really needed (and is sometimes harmful) in Content-Disposition, so just a file name can be sent.

Would you be willing to submit such a patch for WebCore, as described in &lt;http://webkit.org/coding/contributing.html&gt;?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4514</commentid>
    <comment_count>3</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-07-17 08:23:03 -0700</bug_when>
    <thetext>What does Firefox or MSIE (or Opera) when uploading this file?  Do they encode the path differently?

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4515</commentid>
    <comment_count>4</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-07-17 08:24:01 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; I might well be wrong, but I think that a full path is not really needed (and
&gt; is sometimes harmful) in Content-Disposition, so just a file name can be sent.

But if the actual file contained UTF8 (non-ASCII) characters, this doesn&apos;t really fix the issue.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4516</commentid>
    <comment_count>5</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-07-17 08:24:35 -0700</bug_when>
    <thetext>&lt;rdar://problem/5340188&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4493</commentid>
    <comment_count>6</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-07-17 12:44:56 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; But if the actual file contained UTF8 (non-ASCII) characters, this doesn&apos;t
&gt; really fix the issue.

That&apos;s true, but we don&apos;t have to fix everything at once - there isn&apos;t any 100% correct solution for non-ASCII characters in HTTP headers AFAIK, so it will take a lot of tweaking. 

Also, most experienced users know about the perils of non-ASCII file names, while it&apos;s really hard to guess that a problem with uploading is caused by a directory name somewhere in the path.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4421</commentid>
    <comment_count>7</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-07-18 08:34:49 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; (In reply to comment #4)
&gt; &gt; But if the actual file contained UTF8 (non-ASCII) characters, this doesn&apos;t
&gt; &gt; really fix the issue.
&gt; 
&gt; That&apos;s true, but we don&apos;t have to fix everything at once - there isn&apos;t any 100%
&gt; correct solution for non-ASCII characters in HTTP headers AFAIK, so it will
&gt; take a lot of tweaking. 
&gt; 
&gt; Also, most experienced users know about the perils of non-ASCII file names,
&gt; while it&apos;s really hard to guess that a problem with uploading is caused by a
&gt; directory name somewhere in the path.

My main concern is that this would make Safari on Windows behave differently from every other browser with respect to uploading files.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4382</commentid>
    <comment_count>8</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-07-18 15:26:25 -0700</bug_when>
    <thetext>Why can&apos;t we use &quot;encoded-word&quot; encoding for the path as defined by RFC 2047?  It&apos;s perfect for this application--encoding non-US-ASCII characters in a US-ASCII-only field!  We could either encode the path on a per-directory basis (encode each set of characters between directory separators), or encode the whole string.  (I would recommend encoding text between each directory separator since server-side software would have to be updated to understand how to decode such fields.)

http://tools.ietf.org/html/rfc2047

Updates to RFC 2047:

http://tools.ietf.org/html/rfc2184
http://tools.ietf.org/html/rfc2231

Confirming bug based on empirical evidence.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4363</commentid>
    <comment_count>9</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-07-18 21:30:52 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; Why can&apos;t we use &quot;encoded-word&quot; encoding for the path as defined by RFC 2047? 

Let&apos;s track this as a separate bug, please. The fact that a full path is sent from Windows is just a porting bug AFAICT - it&apos;s not sent from the Mac.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4314</commentid>
    <comment_count>10</comment_count>
    <who name="">808caaa4.8ce9.9cd6c799e9f6</who>
    <bug_when>2007-07-19 03:56:54 -0700</bug_when>
    <thetext>/* bug#14667 for the encoding of filename part discussion */</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2782</commentid>
    <comment_count>11</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-08-08 22:21:49 -0700</bug_when>
    <thetext>The problem is in HTMLFormElement::formData():
    int start = path.reverseFind(&apos;/&apos;) + 1;

We should be using PathFindFileName() API on Windows, and possibly basename(3) where available. I&apos;m trying to think of a good place to put a helper function...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2503</commentid>
    <comment_count>12</comment_count>
      <attachid>15933</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-08-11 12:50:38 -0700</bug_when>
    <thetext>Created attachment 15933
proposed fix

Not tested, as I don&apos;t have a Windows build environment set up.

AFAICT, path operations aren&apos;t needed anywhere else in WebCore, so a slightly buggy static helper looks like an fine solution :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2504</commentid>
    <comment_count>13</comment_count>
      <attachid>15933</attachid>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2007-08-11 12:54:17 -0700</bug_when>
    <thetext>Comment on attachment 15933
proposed fix

+static String pathGetFileName(const String&amp; path)
+{
+#if PLATFORM(WIN_OS)
+    return String(PathFindFileName(path.charactersWithNullTermination()));

This won&apos;t compile, since charactersWithNullTermination is a non-const instance method.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2506</commentid>
    <comment_count>14</comment_count>
      <attachid>15934</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-08-11 13:03:26 -0700</bug_when>
    <thetext>Created attachment 15934
updated patch

Oops - I wonder why it is non-const if it doesn&apos;t really modify the string.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2397</commentid>
    <comment_count>15</comment_count>
      <attachid>15934</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2007-08-13 11:39:27 -0700</bug_when>
    <thetext>Comment on attachment 15934
updated patch

+    return String(PathFindFileName(path.charactersWithNullTermination()));

Do you need the explicit String() here? Doesn&apos;t the conversion happen automatically?

Also, we often use &quot;filename&quot; as a single word; so I think the variables and functions could just be all lowercase.

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2392</commentid>
    <comment_count>16</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-08-13 12:12:25 -0700</bug_when>
    <thetext>(In reply to comment #15)
&gt; Do you need the explicit String() here? Doesn&apos;t the conversion happen
&gt; automatically?

I wondered the same when I saw such a construct in FileChooserWin.cpp, so I preserved it for safety (I don&apos;t have a Windows build environment set up at the moment).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2374</commentid>
    <comment_count>17</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-08-13 22:52:38 -0700</bug_when>
    <thetext>Committed revision 25067.

</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>15933</attachid>
            <date>2007-08-11 12:50:38 -0700</date>
            <delta_ts>2007-08-11 13:03:26 -0700</delta_ts>
            <desc>proposed fix</desc>
            <filename>14635r1_patch.txt</filename>
            <type>text/plain</type>
            <size>2944</size>
            <attacher name="Alexey Proskuryakov">ap</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiAyNTAxMykKKysrIFdlYkNvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBA
IC0xLDMgKzEsMTcgQEAKKzIwMDctMDgtMTEgIEFsZXhleSBQcm9za3VyeWFrb3YgIDxhcEB3ZWJr
aXQub3JnPgorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAg
IGh0dHA6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTE0NjM1CisgICAgICAgIHJk
YXI6Ly9wcm9ibGVtLzUzNDAxODgKKyAgICAgICAgVXBsb2FkaW5nIGZpbGUgd2l0aCBub24tQVND
SUkgY2hhcmFjdGVyIGluIHBhdGggZmFpbHMKKworICAgICAgICBGaWxlIHVwb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AgICAvLyBGSVhNRTogVGhpcyB3b24ndCB3b3JrIGlmIHRoZSBmaWxl
bmFtZSBpbmNsdWRlcyBhICIgbWFyaywKICAgICAgICAgICAgICAgICAgICAgICAgIC8vIG9yIGNv
bnRyb2wgY2hhcmFjdGVycyBsaWtlIENSIG9yIExGLiBUaGlzIGFsc28gZG9lcyBzdHJhbmdlCiAg
ICAgICAgICAgICAgICAgICAgICAgICAvLyB0aGluZ3MgaWYgdGhlIGZpbGVuYW1lIGluY2x1ZGVz
IGNoYXJhY3RlcnMgeW91IGNhbid0IGVuY29kZQogICAgICAgICAgICAgICAgICAgICAgICAgLy8g
aW4gdGhlIHdlYnNpdGUncyBjaGFyYWN0ZXIgc2V0LgogICAgICAgICAgICAgICAgICAgICAgICAg
aHN0ciArPSAiOyBmaWxlbmFtZT1cIiI7Ci0gICAgICAgICAgICAgICAgICAgICAgICBpbnQgc3Rh
cnQgPSBwYXRoLnJldmVyc2VGaW5kKCcvJykgKyAxOwotICAgICAgICAgICAgICAgICAgICAgICAg
aW50IGxlbmd0aCA9IHBhdGgubGVuZ3RoKCkgLSBzdGFydDsKLSAgICAgICAgICAgICAgICAgICAg
ICAgIGhzdHIgKz0gZW5jb2RpbmcuZW5jb2RlKHJlaW50ZXJwcmV0X2Nhc3Q8Y29uc3QgVUNoYXIq
PihwYXRoLmNoYXJhY3RlcnMoKSArIHN0YXJ0KSwgbGVuZ3RoLCB0cnVlKS5kYXRhKCk7CisgICAg
ICAgICAgICAgICAgICAgICAgICBoc3RyICs9IGVuY29kaW5nLmVuY29kZShyZWludGVycHJldF9j
YXN0PGNvbnN0IFVDaGFyKj4oZmlsZU5hbWUuY2hhcmFjdGVycygpKSwgZmlsZU5hbWUubGVuZ3Ro
KCksIHRydWUpLmRhdGEoKTsKICAgICAgICAgICAgICAgICAgICAgICAgIGhzdHIgKz0gIlwiIjsK
IAogICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFzdGF0aWNfY2FzdDxIVE1MSW5wdXRFbGVt
ZW50Kj4oY3VycmVudCktPnZhbHVlKCkuaXNFbXB0eSgpKSB7Cg==
</data>
<flag name="review"
          id="6676"
          type_id="1"
          status="-"
          setter="aroben"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>15934</attachid>
            <date>2007-08-11 13:03:26 -0700</date>
            <delta_ts>2007-08-13 11:39:27 -0700</delta_ts>
            <desc>updated patch</desc>
            <filename>14635r2_patch.txt</filename>
            <type>text/plain</type>
            <size>2937</size>
            <attacher name="Alexey Proskuryakov">ap</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiAyNTAxMykKKysrIFdlYkNvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBA
IC0xLDMgKzEsMTcgQEAKKzIwMDctMDgtMTEgIEFsZXhleSBQcm9za3VyeWFrb3YgIDxhcEB3ZWJr
aXQub3JnPgorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAg
IGh0dHA6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTE0NjM1CisgICAgICAgIHJk
YXI6Ly9wcm9ibGVtLzUzNDAxODgKKyAgICAgICAgVXBsb2FkaW5nIGZpbGUgd2l0aCBub24tQVND
SUkgY2hhcmFjdGVyIGluIHBhdGggZmFpbHMKKworICAgICAgICBGaWxlIHVwbG9hZCBjYW5ub3Qg
YmUgdGVzdGVkIGluIER1bXBSZW5kZXJUcmVlLgorCisgICAgICAgICogaHRtbC9IVE1MRm9ybUVs
ZW1lbnQuY3BwOgorICAgICAgICAoV2ViQ29yZTo6cGF0aEdldEZpbGVOYW1lKTogQSBjcm9zcy1w
bGF0Zm9ybS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gYWxzbyBkb2VzIHN0cmFuZ2UKICAgICAgICAg
ICAgICAgICAgICAgICAgIC8vIHRoaW5ncyBpZiB0aGUgZmlsZW5hbWUgaW5jbHVkZXMgY2hhcmFj
dGVycyB5b3UgY2FuJ3QgZW5jb2RlCiAgICAgICAgICAgICAgICAgICAgICAgICAvLyBpbiB0aGUg
d2Vic2l0ZSdzIGNoYXJhY3RlciBzZXQuCiAgICAgICAgICAgICAgICAgICAgICAgICBoc3RyICs9
ICI7IGZpbGVuYW1lPVwiIjsKLSAgICAgICAgICAgICAgICAgICAgICAgIGludCBzdGFydCA9IHBh
dGgucmV2ZXJzZUZpbmQoJy8nKSArIDE7Ci0gICAgICAgICAgICAgICAgICAgICAgICBpbnQgbGVu
Z3RoID0gcGF0aC5sZW5ndGgoKSAtIHN0YXJ0OwotICAgICAgICAgICAgICAgICAgICAgICAgaHN0
ciArPSBlbmNvZGluZy5lbmNvZGUocmVpbnRlcnByZXRfY2FzdDxjb25zdCBVQ2hhcio+KHBhdGgu
Y2hhcmFjdGVycygpICsgc3RhcnQpLCBsZW5ndGgsIHRydWUpLmRhdGEoKTsKKyAgICAgICAgICAg
ICAgICAgICAgICAgIGhzdHIgKz0gZW5jb2RpbmcuZW5jb2RlKHJlaW50ZXJwcmV0X2Nhc3Q8Y29u
c3QgVUNoYXIqPihmaWxlTmFtZS5jaGFyYWN0ZXJzKCkpLCBmaWxlTmFtZS5sZW5ndGgoKSwgdHJ1
ZSkuZGF0YSgpOwogICAgICAgICAgICAgICAgICAgICAgICAgaHN0ciArPSAiXCIiOwogCiAgICAg
ICAgICAgICAgICAgICAgICAgICBpZiAoIXN0YXRpY19jYXN0PEhUTUxJbnB1dEVsZW1lbnQqPihj
dXJyZW50KS0+dmFsdWUoKS5pc0VtcHR5KCkpIHsK
</data>
<flag name="review"
          id="6677"
          type_id="1"
          status="+"
          setter="darin"
    />
          </attachment>
      

    </bug>

</bugzilla>