[wp-trac] [WordPress Trac] #39875: PDF previews overwrite existing images with the same name.
WordPress Trac
noreply at wordpress.org
Mon Feb 27 19:24:53 UTC 2017
#39875: PDF previews overwrite existing images with the same name.
-------------------------------------------------+------------------------
Reporter: gitlost | Owner: joemcgill
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 4.7.3
Component: Media | Version: 4.7
Severity: normal | Resolution: fixed
Keywords: has-patch needs-testing fixed-major | Focuses:
-------------------------------------------------+------------------------
Changes (by joemcgill):
* status: reopened => closed
* resolution: => fixed
Comment:
In [changeset:"40133"]:
{{{
#!CommitTicketReference repository="" revision="40133"
Media: Keep PDF previews from overwriting files.
Since support for PDF previews were added in [38949], it's possible
that the generated image file could overwrite an existing image file
with the same name. This uses wp_unique_filename() to avoid this
issue and adds a '-pdf' identifier on the end of filenames.
Props gitlost, desrosj, mikeschroder, joemcgill.
Merges [40130] and [40131] to the 4.7 branch.
Fixes #39875. See #31050.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39875#comment:26>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list