[wp-trac] [WordPress Trac] #53668: Generated images for one file can be overwritten by another with the same name when mapping mime types for generated images

WordPress Trac noreply at wordpress.org
Tue Aug 17 20:46:02 UTC 2021


#53668: Generated images for one file can be overwritten by another with the same
name when mapping mime types for generated images
----------------------------------------------------+---------------------
 Reporter:  ianmjones                               |       Owner:  (none)
     Type:  defect (bug)                            |      Status:  new
 Priority:  normal                                  |   Milestone:  5.8.1
Component:  Media                                   |     Version:  5.8
 Severity:  normal                                  |  Resolution:
 Keywords:  has-patch needs-testing has-unit-tests  |     Focuses:
----------------------------------------------------+---------------------

Comment (by azaozz):

 Looking at the new test in 53668.6.diff, not sure that a good use of the
 `wp_unique_filename` filter. Perhaps having access to each filename that's
 checked for collision may be used in plugins, but may be better to add
 another/specific filter there that should probably just filter `$number`
 and not allow changing the (currently tested) filename?

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


More information about the wp-trac mailing list