Make WordPress Core


Ignore:
Timestamp:
12/12/2018 11:10:04 PM (7 years ago)
Author:
jeremyfelt
Message:

Media: Improve verification of MIME file types.

Merges [43988] to the 4.5 branch.

Location:
branches/4.5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.5

  • branches/4.5/tests/phpunit/tests/functions.php

    r36883 r43993  
    462462                true,
    463463            ),
    464             // Android 2.2, Android Webkit Browser 
     464            // Android 2.2, Android Webkit Browser
    465465            array(
    466466                'Mozilla/5.0 (Android 2.2; Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4',
    467467                true,
    468468            ),
    469             // BlackBerry 9900, BlackBerry browser 
     469            // BlackBerry 9900, BlackBerry browser
    470470            array(
    471471                'Mozilla/5.0 (BlackBerry; U; BlackBerry 9900; en) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.1.0.346 Mobile Safari/534.11+',
     
    481481                'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0',
    482482                true,
     483            ),
     484            // Non-image file not allowed even if it's named like one.
     485            array(
     486                DIR_TESTDATA . '/export/crazy-cdata.xml',
     487                'crazy-cdata.jpg',
     488                array(
     489                    'ext' => false,
     490                    'type' => false,
     491                    'proper_filename' => false,
     492                ),
     493            ),
     494            // Non-image file not allowed if it's named like something else.
     495            array(
     496                DIR_TESTDATA . '/export/crazy-cdata.xml',
     497                'crazy-cdata.doc',
     498                array(
     499                    'ext' => false,
     500                    'type' => false,
     501                    'proper_filename' => false,
     502                ),
    483503            ),
    484504        );
Note: See TracChangeset for help on using the changeset viewer.