Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #39550, comment 86


Ignore:
Timestamp:
01/30/2017 09:23:44 PM (8 years ago)
Author:
contrid
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #39550, comment 86

    initial v1  
    1010
    1111This specifically became a problem in WordPress 4.7.1 and worked fine before that, detecting the real mime and mime from supported/allowed mime types list correctly before.
     12
     13Update:
     14
     15It looks like the finfo_file() function is a new thing in WordPress 4.7.1 checking the real mime type of the file and it wasn't there before. If you don't have finfo_file() function available on your PHP, you won't experience problems but if you do and the mime of WordPress and PHP don't match you get the security error.
     16
     17The Disable Real Mime Check plugin does the trick: https://wordpress.org/plugins/disable-real-mime-check/ . It hooks to the  wp_check_filetype_and_ext and replaces whatever the real mime check did back with wp_check_filetype() results, making sure the mimes match so the file can complete.