Make WordPress Core


Ignore:
Timestamp:
10/14/2019 06:49:56 PM (7 years ago)
Author:
whyisjake
Message:

Backporting several bug fixes.

  • Query: Remove the static query property.
  • HTTP API: Protect against hex interpretation.
  • Filesystem API: Prevent directory travelersals when creating new folders.
  • Administration: Ensure that admin referer nonce is valid.
  • REST API: Send a Vary: Origin header on GET requests.

Backports [46474], [46475], [46476], [46477], [46478], [46483], [46485] to the 4.7 branch.

Location:
branches/4.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.7

  • branches/4.7/src/wp-includes/pluggable.php

    r45977 r46495  
    10561056 */
    10571057function check_admin_referer( $action = -1, $query_arg = '_wpnonce' ) {
    1058     if ( -1 == $action )
     1058    if ( -1 === $action )
    10591059        _doing_it_wrong( __FUNCTION__, __( 'You should specify a nonce action to be verified by using the first parameter.' ), '3.2.0' );
    10601060
     
    10741074    do_action( 'check_admin_referer', $action, $result );
    10751075
    1076     if ( ! $result && ! ( -1 == $action && strpos( $referer, $adminurl ) === 0 ) ) {
     1076    if ( ! $result && ! ( -1 === $action && strpos( $referer, $adminurl ) === 0 ) ) {
    10771077        wp_nonce_ays( $action );
    10781078        die();
     
    25192519}
    25202520endif;
    2521 
Note: See TracChangeset for help on using the changeset viewer.