[wp-trac] [WordPress Trac] #42437: Thumbnails can overwrite other uploads if filename matches
WordPress Trac
noreply at wordpress.org
Thu Dec 5 18:51:11 UTC 2019
#42437: Thumbnails can overwrite other uploads if filename matches
-------------------------------------------------+-------------------------
Reporter: Viper007Bond | Owner: pbiron
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 5.3.1
Component: Upload | Version: 4.8.3
Severity: normal | Resolution:
Keywords: has-patch needs-testing needs-unit- | Focuses:
tests |
-------------------------------------------------+-------------------------
Comment (by pbiron):
Replying to [comment:43 azaozz]:
> Replying to [comment:42 pbiron]:
> I agree. This is a "far fetched" edge case but since we're trying to fix
"all" cases, perhaps good to account for it too :)
"far fetched", maybe; "real world", definitely! It's actually the case
that brought this ticket to my attention last year. An artist uploaded an
image with a "dimension-like" filename to a site...no conflicts at that
time. I later changed themes, the new theme changed sub-sizes so I
regenerated thumbnails and found the artist's original image had been
overridden.
> BTW, the unit tests seem to pass here with 42437.3.diff. Lets look at
adding some more :)
What's the process for addng new images to `tests/phpunit/data/images`?
Not sure how to do that with "regular" a patch. For more unit tests we'll
need some additional test images to test against.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42437#comment:44>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list