Make WordPress Core

Changeset 22471


Ignore:
Timestamp:
11/08/2012 08:41:34 PM (12 years ago)
Author:
nacin
Message:

Account for unfiltered_upload cap in wp_upload_bits(). see #21292.

File:
1 edited

Legend:

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

    r22331 r22471  
    16781678
    16791679    $wp_filetype = wp_check_filetype( $name );
    1680     if ( !$wp_filetype['ext'] )
     1680    if ( ! $wp_filetype['ext'] && ! current_user_can( 'unfiltered_upload' ) )
    16811681        return array( 'error' => __( 'Invalid file type' ) );
    16821682
Note: See TracChangeset for help on using the changeset viewer.