[wp-trac] [WordPress Trac] #22363: Accents in attachment filenames should be sanitized

WordPress Trac noreply at wordpress.org
Mon Oct 10 11:09:20 UTC 2016


#22363: Accents in attachment filenames should be sanitized
-------------------------------------+---------------------------
 Reporter:  tar.gz                   |       Owner:  mikeschroder
     Type:  defect (bug)             |      Status:  assigned
 Priority:  normal                   |   Milestone:  4.7
Component:  Media                    |     Version:  3.4
 Severity:  critical                 |  Resolution:
 Keywords:  needs-testing has-patch  |     Focuses:
-------------------------------------+---------------------------

Comment (by gitlost):

 Note in order for the OP to be fixed, #24661 needs to be fixed also, using
 eg patch
 [https://core.trac.wordpress.org/attachment/ticket/24661/24661.5.patch
 24661.5.patch].

 Maybe Safari's behaviour has changed in version 10 but I can reproduce it
 with the latest nightly (4.7-alpha-38766) running on Ubuntu 16.04 using
 Safari (version 6) and Firefox (48.0.1) or Chrome (49.0.2623.112) on OS X
 10.8 Mountain Lion (VirtualBox Hackintosh).

 Upload a file with diacritics eg "forêt.png" using Firefox or Chrome on OS
 X. The file will be uploaded as "2016/10/fore\xcc\x82t.png" (NFD). Then
 view the uploaded file in Safari ("wp-admin/upload.php"). Safari converts
 the filename to "2016/10/for\xc3\xaat.png" (NFC) and it doesn't display.
 If the two patches
 [https://core.trac.wordpress.org/attachment/ticket/22363/22363.12.patch
 22363.12.patch] and
 [https://core.trac.wordpress.org/attachment/ticket/24661/24661.5.patch
 24661.5.patch] are applied then the file is uploaded as
 "2016/10/foret.png" so the issue doesn't arise.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/22363#comment:93>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list