Make WordPress Core


Ignore:
Timestamp:
12/18/2018 04:34:17 PM (8 years ago)
Author:
desrosj
Message:

Media: Improve verification of MIME file types.

Merges [43988] to trunk.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/tests/phpunit/tests/functions.php

    r43658 r44292  
    13021302                                'big5.jpg',
    13031303                                array(
    1304                                         'ext'             => 'jpg',
    1305                                         'type'            => 'image/jpeg',
     1304                                        'ext'             => false,
     1305                                        'type'            => false,
    13061306                                        'proper_filename' => false,
    13071307                                ),
    … …  
    13111311                                DIR_TESTDATA . '/export/crazy-cdata.xml',
    13121312                                'crazy-cdata.xml',
     1313                                array(
     1314                                        'ext'             => false,
     1315                                        'type'            => false,
     1316                                        'proper_filename' => false,
     1317                                ),
     1318                        ),
     1319                        // Non-image file not allowed even if it's named like one.
     1320                        array(
     1321                                DIR_TESTDATA . '/export/crazy-cdata.xml',
     1322                                'crazy-cdata.jpg',
     1323                                array(
     1324                                        'ext'             => false,
     1325                                        'type'            => false,
     1326                                        'proper_filename' => false,
     1327                                ),
     1328                        ),
     1329                        // Non-image file not allowed if it's named like something else.
     1330                        array(
     1331                                DIR_TESTDATA . '/export/crazy-cdata.xml',
     1332                                'crazy-cdata.doc',
    13131333                                array(
    13141334                                        'ext'             => false,
Note: See TracChangeset for help on using the changeset viewer.