Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#46078 closed defect (bug) (worksforme)

Can't Import CSV's to Media Library - not permitted for security reasons

Reported by: jonyfox Owned by:
Milestone: Priority: normal
Severity: critical Version: 5.0.3
Component: Media Keywords:
Focuses: Cc:

Description

Hi,

I'm currently running the latest version of wordpress.

I've always been able to upload csv files to my media library until wordpress 5 but now i get this message:

Sorry, this file type is not permitted for security reasons.

CSV files are vital for mine and other peoples business, i know other people who are having a similar issue with the latest version of wordpress.

I am currently using a plugin called "Disable Mime Check" to bypass this issue, although i'm not a big fan of using plugins and feel as though wordpress core shouldn't be giving me this issue.

Any help with this would be great.

Kind Regards,
Jonathan

Attachments (1)

wc-product-export-22-1-2019-1548173304472.csv (230.2 KB) - added by jonyfox 3 years ago.
Woocommerce CSV file

Download all attachments as: .zip

Change History (5)

#1 @jonyfox
3 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

I think i've solved this, Please see the below from another post i've done:

Hi,

Upon importing a woocommerce csv file i get this message:

Sorry, this file type is not permitted for security reasons.

I think i know what causes this issue.

Inside the woocommerce CSV there is HTML saved from the description boxes. if you remove all the html in csv document and save the file then wordpress will allow the file to import into wordpress.

I’ve got a feeling that this is to do with wordpress’s new MIME security update where by it classes the HTML in the csv file as a security threat (I’m not 100% though).

I’m just telling you guys in case you can fix this.

Kind Regards,
Jonathan

#2 follow-up: @joemcgill
3 years ago

Thanks for the report, @jonyfox. This is likely a related to #45615, but if you're still seeing errors in WP version 5.3, then you're likely correct that something in the file is flagging the file as a MIME type that isn't allowed. If you are able to upload an example CSV that is failing, that will help us asses the best way to fix this issue moving forward.

#3 in reply to: ↑ 2 @jonyfox
3 years ago

Replying to joemcgill:

Thanks for the report, @jonyfox. This is likely a related to #45615, but if you're still seeing errors in WP version 5.3, then you're likely correct that something in the file is flagging the file as a MIME type that isn't allowed. If you are able to upload an example CSV that is failing, that will help us asses the best way to fix this issue moving forward.

Hi Joe,

Please see the attached woocommerce CSV file that I've uploaded to this post.

Kind Regards,
Jon

@jonyfox
3 years ago

Woocommerce CSV file

#4 @desrosj
3 years ago

  • Milestone Awaiting Review deleted

Removing Awaiting Review milestone from closed tickets.

Note: See TracTickets for help on using tickets.