[wp-trac] [WordPress Trac] #42437: Thumbnails can overwrite other uploads if filename matches

WordPress Trac noreply at wordpress.org
Wed May 16 15:17:19 UTC 2018


#42437: Thumbnails can overwrite other uploads if filename matches
--------------------------+-----------------------------
 Reporter:  Viper007Bond  |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Future Release
Component:  Upload        |     Version:  4.8.3
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+-----------------------------

Comment (by pbiron):

 Replying to [comment:18 blobfolio]:
 > For example, say a site user uploaded an image called `image-
 123x123.jpg` a year ago. (No patch can fix the past. Haha.) Then today,
 they decide to upload a file called `image.jpg`. If we are only looking at
 the source file, no collision would be detected, however once WP crunches
 out the `123x123` thumbnail size, a collision will happen (the original
 file from a year ago will be blown away).

 Actually, the patch I just added does handle this case...although, as
 [[https://core.trac.wordpress.org/ticket/42437?replyto=18#comment:19|I
 mentioned]], the **way** it does so is sub-optimal.

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


More information about the wp-trac mailing list