Make WordPress Core

Changeset 56497

Timestamp:
08/30/2023 10:30:06 PM (11 months ago)
Author:
audrasjb
Message:

Upload: Add a MIME type exception for .docx generated by Google Docs.

This changeset adds an exception to prevent permission issues on .docx generated by Google Docs. This is a temporary fix for an upstream bug on the finfo_file()
PHP function which returns a redundant MIME type for these documents.

Props winterstreet, jakariaistauk, mujuonly, mi5t4n, annashopina, audrasjb, azaozz, mikeschroder, oglekler.
Fixes #57898.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r56494 r56497  
    31503150        $real_mime = finfo_file( $finfo, $file );
    31513151        finfo_close( $finfo );
     3152
     3153
     3154
     3155
     3156
    31523157
    31533158        // fileinfo often misidentifies obscure files as one of these types.
Note: See TracChangeset for help on using the changeset viewer.