[wp-trac] Re: [WordPress Trac] #9416: Better file name sanitization for wp_unique_filename

WordPress Trac wp-trac at lists.automattic.com
Fri Apr 24 17:20:39 GMT 2009


#9416: Better file name sanitization for wp_unique_filename
-------------------------+--------------------------------------------------
 Reporter:  sivel        |       Owner:  sivel                                     
     Type:  enhancement  |      Status:  assigned                                  
 Priority:  normal       |   Milestone:  2.8                                       
Component:  Upload       |     Version:  2.7.1                                     
 Severity:  normal       |    Keywords:  has-patch early dev-feedback needs-testing
-------------------------+--------------------------------------------------

Comment(by ryan):

 Maintaining strtolower on the extension might be desirable.  JPG always
 becomes jpg.  A possible way to avoid dupes that differe only in case is:

 {{{
 WHERE meta_key = '_wp_attached_file' AND LCASE( meta_value ) = LCASE( %s )
 }}}

 Suggested by Mark.

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


More information about the wp-trac mailing list