[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
Sat Aug 14 22:24:32 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):

 Replying to [comment:22 ianmjones]:
 > Happy to test and review your PR when it's ready

 Sure, it's linked above.

 > It does cover that scenario, but only as a side-effect of the thumbnail
 regeneration protection scenario I was going for.

 Ah, right. Added a check for that in the alt patch too. Think it's ready.
 It does the tests for the alt file extension in the same `while` loop as
 the tests for upper case and normal extensions. Another change is that
 wp_get_default_extension_for_mime_type() requires the mime-type arg. Also
 updated few of the test explanation strings for a bit more clarity.

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


More information about the wp-trac mailing list