[wp-trac] [WordPress Trac] #39550: Some Non-image files fail to upload after 4.7.1
WordPress Trac
noreply at wordpress.org
Mon Jan 16 23:29:04 UTC 2017
#39550: Some Non-image files fail to upload after 4.7.1
---------------------------+------------------------
Reporter: greatislander | Owner: joemcgill
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 4.7.2
Component: Upload | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
---------------------------+------------------------
Changes (by blobfolio):
* keywords: needs-patch => has-patch
Comment:
I rewrote the `blob-mimes` library to work within the WordPress core and
altered `wp_check_filetype_and_ext()` to:
-- only pass expected image types to the image handling (i.e. fix SVG
breakages)
-- run FINFO (if possible) if, after the image code, `$type` is still
false
-- FINFO checks do not trigger false if the server cannot figure out what
kind of file it is, or if the MIME returned is the generic "application
/octet-stream"
-- the MIME database is greatly expanded (more than 10-fold) via `blob-
mimes`, though only hooked into this one area at the moment. More work
could be done to improve/expand MIME-related checks throughout the code
base. But one step at a time...
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39550#comment:58>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list