[wp-trac] [WordPress Trac] #58094: CSV files are prevented in PHP 8.1. due to wp_check_filetype_and_ext()

WordPress Trac noreply at wordpress.org
Wed Apr 5 18:34:59 UTC 2023


#58094: CSV files are prevented in PHP 8.1. due to wp_check_filetype_and_ext()
--------------------------+-----------------------------
 Reporter:  bradshawtm    |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Upload        |    Version:  6.2
 Severity:  minor         |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 `finfo_file()` gives different results for the same file in different PHP
 versions:

 PHP 7.4: `text/plain`
 PHP 8.0: `application/csv`
 PHP 8.1: `text/csv`

 The first two are currently allowed by WP, but the latter is not.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58094>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list