[wp-trac] [WordPress Trac] #22813: Media Uploader doesn't escape "+" in filenames and doesn't upload file

WordPress Trac noreply at wordpress.org
Tue Apr 23 03:48:58 UTC 2013


#22813: Media Uploader doesn't escape "+" in filenames and doesn't upload file
--------------------------+------------------------------
 Reporter:  devinreams    |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Media         |     Version:  3.4.2
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------------------
Changes (by jamescollins):

 * keywords:  needs-patch => has-patch


Comment:

 (as per #24117), I'm also seeing this problem on our Apache servers on our
 multisite installations that use ms-files.php rewriting.

 The safest approach here seems to be to automatically remove + characters
 from file names during the upload process.

 {{{22813.diff}}} achieves this by modifying the sanitize_file_name()
 function.

 This problem is also similar to the one reported in #16330 (which also has
 a patch).

 This solution solves the problem for new files that are uploaded, however
 it doesn't solve it for any existing media library files that contain a
 plus sign in their name.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/22813#comment:12>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list