WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/14/2019 06:16:02 PM (2 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 5.1 branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.1/src/wp-includes/pluggable.php

    r45973 r46490  
    10931093     */
    10941094    function check_admin_referer( $action = -1, $query_arg = '_wpnonce' ) {
    1095         if ( -1 == $action ) {
     1095        if ( -1 === $action ) {
    10961096            _doing_it_wrong( __FUNCTION__, __( 'You should specify a nonce action to be verified by using the first parameter.' ), '3.2.0' );
    10971097        }
     
    11121112        do_action( 'check_admin_referer', $action, $result );
    11131113
    1114         if ( ! $result && ! ( -1 == $action && strpos( $referer, $adminurl ) === 0 ) ) {
     1114        if ( ! $result && ! ( -1 === $action && strpos( $referer, $adminurl ) === 0 ) ) {
    11151115            wp_nonce_ays( $action );
    11161116            die();
Note: See TracChangeset for help on using the changeset viewer.