[wp-trac] [WordPress Trac] #40175: Upload Validation / MIME Handling

WordPress Trac noreply at wordpress.org
Thu Jan 17 22:29:18 UTC 2019


#40175: Upload Validation / MIME Handling
-------------------------------------------------+-------------------------
 Reporter:  blobfolio                            |       Owner:  joemcgill
     Type:  defect (bug)                         |      Status:  accepted
 Priority:  normal                               |   Milestone:  5.1
Component:  Media                                |     Version:  4.7.3
 Severity:  major                                |  Resolution:
 Keywords:  has-unit-tests has-patch needs-      |     Focuses:
  testing early needs-dev-note                   |  administration
-------------------------------------------------+-------------------------

Comment (by joemcgill):

 [attachment:"40175.4.diff"] is an iteration on [attachment:"40175.3.diff"]
 which includes the following changes:

 - Removes `application/octet-stream` from the list of supported mime types
 for `exe` files.
 - Rename the filter in `wp_get_file_types()` from `wp_mimes` to
 `wp_file_types`.
 - Rename `wp_maybe_rename_file` to `wp_maybe_fix_image_extension()`.
 - Fixes some bugs when filtering the list of mime types due to the early
 `wp_check_filetype()` check or improper extension renaming.
 - Adds a unit test for GPX files, which also serves as a test for the
 `wp_file_types` filter.

 **TODO:**

 - Implement a deprecation strategy for `wp_get_mime_types()`.
 - Decide how to handle unit tests that fail based on underlying server
 architecture.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/40175#comment:53>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list