[wp-trac] [WordPress Trac] #46375: WordPress discovery MIME type

WordPress Trac noreply at wordpress.org
Thu Mar 14 18:33:45 UTC 2019


#46375: WordPress discovery MIME type
--------------------------+------------------------
 Reporter:  killua99      |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Upload        |     Version:
 Severity:  normal        |  Resolution:  duplicate
 Keywords:                |     Focuses:
--------------------------+------------------------
Changes (by desrosj):

 * status:  new => closed
 * resolution:   => duplicate
 * version:  5.1 =>
 * component:  General => Upload
 * milestone:  Awaiting Review =>


Comment:

 Hello, all. Thanks for creating this ticket and sorry to hear you are
 experiencing issues.

 This issue stems from a security patch that was applied in WordPress 5.0.1
 that changed how mime types for files are processed to ensure the file
 actually matches the type the extension indicates it is. This was a
 backwards compatibility break and is detailed in
 [https://make.wordpress.org/core/author/iandunn/ this blog post].

 After 5.0.1, there were many tickets created (#45655 and 45630, to name a
 few). The issue was solved for CSVs (and a few other common file types) in
 [https://make.wordpress.org/core/2019/01/07/wordpress-5-0-3-release-
 candidate/ version 5.0.3] (see commit [44438] and issue #45615). This fix
 is included in all versions following 5.0.3, which includes 5.1.
 WooCommerce [https://github.com/woocommerce/woocommerce/pull/22209 decided
 to not ship a fix for this] and instead waited for 5.0.3 to be released.

 #40175 is a second ticket that is being worked on that will fix the issue
 more completely.

 As for the CSV not uploading in WooCommerce (or Core in general), I have
 been unable to reproduce the issue under the following scenarios (all with
 fresh installs of WordPress, and no plugins active unless listed):

 - WP 5.0.4, no plugins: uploading a CSV works in the media library.
 - WP 5.0.4, WooCommerce: uploading a CSV works in the media library and
 the WooCommerce product import feature.
 - WP 5.1.1, no plugins: uploading a CSV works in the media library.
 - WP 5.1.1, WooCommerce: uploading a CSV works in the media library and
 the WooCommerce product import feature.

 I am going to close this as a duplicate of the ticket included in 5.0.3
 because that should have fixed the issue. I don't doubt that you are still
 experiencing issues, but it does not seem to be a Core issue.

 If you have an Apache mime type configuration on your server, you will
 need to follow up with your hosting company. If you are using the
 [https://github.com/ralouphie/mimey mimey library] linked to in the
 description, you will need to open a ticket with them.

 Some other possible causes:
 - A plugin that was activated while trying to fix is still active.
 - A configuration adjustment made trying to solve the issue is still
 present.
 - The upgrade process did not correctly replace all core files.
 - The CSV file being uploaded is not a proper CSV file.

 If you are still encountering issues after checking these things, please
 open a ''new'' support issue on the WordPress.org support forums. When
 details are added on to resolved issues (like
 [https://wordpress.org/support/topic/wp-5-0-1-breaks-woocommerce-csv-
 import/page/2/#post-11234845 the one in the description]) in the forum,
 support staff is unaware that the tickets need addressing.

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


More information about the wp-trac mailing list