RESOLVED FIXED 184517
input.webkitEntries does not work as expected when folder contains accented chars
https://bugs.webkit.org/show_bug.cgi?id=184517
Summary input.webkitEntries does not work as expected when folder contains accented c...
Chris Dumez
Reported 2018-04-11 15:57:54 PDT
input.webkitEntries returns invalid when folder contains accented chars.
Attachments
Patch (6.02 KB, patch)
2018-04-11 16:25 PDT, Chris Dumez
no flags
Patch (6.03 KB, patch)
2018-04-11 16:27 PDT, Chris Dumez
no flags
Patch (6.01 KB, patch)
2018-04-11 16:38 PDT, Chris Dumez
ews-watchlist: commit-queue-
Archive of layout-test-results from ews107 for mac-sierra-wk2 (3.52 MB, application/zip)
2018-04-11 17:38 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews126 for ios-simulator-wk2 (2.35 MB, application/zip)
2018-04-11 18:10 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews200 for win-future (12.77 MB, application/zip)
2018-04-11 18:15 PDT, EWS Watchlist
no flags
Patch (5.80 KB, patch)
2018-04-11 18:35 PDT, Chris Dumez
no flags
Patch (5.82 KB, patch)
2018-04-11 18:39 PDT, Chris Dumez
no flags
Patch (3.26 KB, patch)
2018-04-12 12:46 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2018-04-11 15:58:08 PDT
Chris Dumez
Comment 2 2018-04-11 16:25:55 PDT
Chris Dumez
Comment 3 2018-04-11 16:27:35 PDT
Chris Dumez
Comment 4 2018-04-11 16:33:24 PDT
Looks like some bots have trouble applying the patch due to the non-ascii character in one of the paths (which I need for testing purposes) :/
Chris Dumez
Comment 5 2018-04-11 16:38:59 PDT
Chris Dumez
Comment 6 2018-04-11 16:39:47 PDT
(In reply to Chris Dumez from comment #4) > Looks like some bots have trouble applying the patch due to the non-ascii > character in one of the paths (which I need for testing purposes) :/ Trying again with: $ git config --global core.quotePath false $ git config --global core.precomposeunicode true
EWS Watchlist
Comment 7 2018-04-11 17:38:43 PDT
Comment on attachment 337748 [details] Patch Attachment 337748 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/7288624 New failing tests: fast/forms/file/entries-api/webkitEntries-nonascii-folder-name.html
EWS Watchlist
Comment 8 2018-04-11 17:38:44 PDT
Created attachment 337758 [details] Archive of layout-test-results from ews107 for mac-sierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
EWS Watchlist
Comment 9 2018-04-11 18:10:56 PDT
Comment on attachment 337748 [details] Patch Attachment 337748 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/7288686 New failing tests: fast/forms/file/entries-api/webkitEntries-nonascii-folder-name.html
EWS Watchlist
Comment 10 2018-04-11 18:10:58 PDT
Created attachment 337760 [details] Archive of layout-test-results from ews126 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews126 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.4
EWS Watchlist
Comment 11 2018-04-11 18:15:47 PDT
Comment on attachment 337748 [details] Patch Attachment 337748 [details] did not pass win-ews (win): Output: http://webkit-queues.webkit.org/results/7288885 New failing tests: fast/forms/file/entries-api/webkitEntries-nonascii-folder-name.html
EWS Watchlist
Comment 12 2018-04-11 18:15:58 PDT
Created attachment 337761 [details] Archive of layout-test-results from ews200 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews200 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Chris Dumez
Comment 13 2018-04-11 18:35:36 PDT
Chris Dumez
Comment 14 2018-04-11 18:39:22 PDT
WebKit Commit Bot
Comment 15 2018-04-11 20:55:56 PDT
Comment on attachment 337765 [details] Patch Clearing flags on attachment: 337765 Committed r230554: <https://trac.webkit.org/changeset/230554>
WebKit Commit Bot
Comment 16 2018-04-11 20:55:58 PDT
All reviewed patches have been landed. Closing bug.
Jonathan Bedard
Comment 17 2018-04-12 10:32:30 PDT
Do we have any other examples of non-ascii folder names in WebKit? I have a pure-svn checkout, and it doesn't seem to play nice with a non-ascii folder.
Alexey Proskuryakov
Comment 18 2018-04-12 11:03:57 PDT
We don't have any files with non-ASCII names. I think that I tried to add some test years ago, and that caused problems. Chris, pease switch to a cgi script with mod_rewrite instead. Here are some example to start: https://stackoverflow.com/questions/5218213/create-a-catch-all-handler-in-php
Ryan Haddad
Comment 19 2018-04-12 11:32:31 PDT
Reverted r230554 for reason: The non-ASCII character in the filename causes issues with SVN Committed r230586: <https://trac.webkit.org/changeset/230586>
Chris Dumez
Comment 20 2018-04-12 11:44:08 PDT
(In reply to Alexey Proskuryakov from comment #18) > We don't have any files with non-ASCII names. I think that I tried to add > some test years ago, and that caused problems. > > Chris, pease switch to a cgi script with mod_rewrite instead. Here are some > example to start: > https://stackoverflow.com/questions/5218213/create-a-catch-all-handler-in-php This is not a viable option, this is using the filesystem. The file is not and cannot be served by a server.
Chris Dumez
Comment 21 2018-04-12 12:07:16 PDT
(In reply to Chris Dumez from comment #20) > (In reply to Alexey Proskuryakov from comment #18) > > We don't have any files with non-ASCII names. I think that I tried to add > > some test years ago, and that caused problems. > > > > Chris, pease switch to a cgi script with mod_rewrite instead. Here are some > > example to start: > > https://stackoverflow.com/questions/5218213/create-a-catch-all-handler-in-php > > This is not a viable option, this is using the filesystem. The file is not > and cannot be served by a server. I'll check if I can write an API test instead.
Chris Dumez
Comment 22 2018-04-12 12:46:56 PDT
Alexey Proskuryakov
Comment 23 2018-04-12 20:44:10 PDT
> This is not a viable option, this is using the filesystem. The file is not and cannot be served by a server. Indeed. But does the path need to actually exit? If not, beginDragWithFiles sounds like it may work here. This is what we are using to simulate adding various fake files to form inputs. It's WebKit1 only, so long term we need a way to simulate arbitrary file input values in WebKit2.
Chris Dumez
Comment 24 2018-04-12 21:10:14 PDT
(In reply to Alexey Proskuryakov from comment #23) > > This is not a viable option, this is using the filesystem. The file is not and cannot be served by a server. > > Indeed. But does the path need to actually exit? If not, beginDragWithFiles > sounds like it may work here. This is what we are using to simulate adding > various fake files to form inputs. It's WebKit1 only, so long term we need a > way to simulate arbitrary file input values in WebKit2. Since the path is not exposed the JS, the test relied on being able (or not) to read the file contents from disk. Since when the path is wrongly encoded, we fail to read the file. Anyway, my latest patch iteration uses an API test instead.
Alex Christensen
Comment 25 2018-04-13 10:04:20 PDT
Comment on attachment 337822 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=337822&action=review > Source/WebCore/platform/posix/FileSystemPOSIX.cpp:354 > + return String::fromUTF8(dirname(fsRep.mutableData())); Maybe we should just call data instead of mutableData now.
Chris Dumez
Comment 26 2018-04-13 10:06:38 PDT
Comment on attachment 337822 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=337822&action=review >> Source/WebCore/platform/posix/FileSystemPOSIX.cpp:354 >> + return String::fromUTF8(dirname(fsRep.mutableData())); > > Maybe we should just call data instead of mutableData now. dirname() takes in a char*, not a const char*
WebKit Commit Bot
Comment 27 2018-04-13 10:37:37 PDT
Comment on attachment 337822 [details] Patch Clearing flags on attachment: 337822 Committed r230639: <https://trac.webkit.org/changeset/230639>
WebKit Commit Bot
Comment 28 2018-04-13 10:37:39 PDT
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.