Opened 9 years ago
Last modified 9 years ago
#40609 new defect (bug)
Cannot register an application/foo+xml mime type without also registering application/xml
| Reported by: | paulsowden | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Upload | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
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
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hello @paulsowden, welcome to WordPress Trac!
Thanks for your report. @joemcgill Could you weigh in here? Is this expected behaviour?