[wp-trac] [WordPress Trac] #16330: media_sideload_image() broken with filenames containing strange characters (e.g., +, %)
WordPress Trac
noreply at wordpress.org
Sun Jun 29 13:02:17 UTC 2014
#16330: media_sideload_image() broken with filenames containing strange characters
(e.g., +, %)
-------------------------------------------------+-------------------------
Reporter: Coolkevman | Owner:
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: Future
Component: Media | Release
Severity: major | Version: 3.1
Keywords: has-patch needs-testing 3.5-early | Resolution:
needs-unit-tests | Focuses:
-------------------------------------------------+-------------------------
Comment (by mattheu):
chatted to johnbillion about this - decided it might be better to replace
`%20` and `+` with dashes along with other whitespace.
I have updated the regex that handles replacing spaces and dashes to do
this. Also updated unit tests.
Note that the removal of the `// Strip the query strings.` code from
`file.php`
Looked through the codebase for possible backwards compatablity issues.
This is used by XML-RPC when uploading files to check whether the file
exists already. This would break this however in that case the image
itself would be broken anyway.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/16330#comment:37>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list