[wp-trac] [WordPress Trac] #40609: Cannot register an application/foo+xml mime type without also registering application/xml
WordPress Trac
noreply at wordpress.org
Sun Apr 30 04:05:10 UTC 2017
#40609: Cannot register an application/foo+xml mime type without also registering
application/xml
--------------------------+-----------------------------
Reporter: paulsowden | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Upload | Version: trunk
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
In wp_check_filetype_and_ext() there is a block that uses finfo_file to
sniff the mime type of a file. When registering an application/foo+xml
type the returned type from finfo_file is application/xml so to allow
application/foo+xml using the upload_mimes filter one must also allow
application/xml otherwise this real_mime check fails.
It seems like the check should allow the original mime type if the
real_mime is application/xml and the $mime is of the form
application/foo+xml
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40609>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list