Make WordPress Core


Ignore:
Timestamp:
11/29/2017 04:28:05 PM (8 years ago)
Author:
johnbillion
Message:

Hardening: Remove the ability to upload JavaScript files for users who do not have the unfiltered_html capability.

Merges [42261] to the 4.4 branch.

Location:
branches/4.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.4

  • branches/4.4/src/wp-includes/functions.php

    r39854 r42287  
    24252425        $unfiltered = $user ? user_can( $user, 'unfiltered_html' ) : current_user_can( 'unfiltered_html' );
    24262426
    2427     if ( empty( $unfiltered ) )
    2428         unset( $t['htm|html'] );
     2427    if ( empty( $unfiltered ) ) {
     2428        unset( $t['htm|html'], $t['js'] );
     2429    }
    24292430
    24302431    /**
Note: See TracChangeset for help on using the changeset viewer.