Make WordPress Core


Ignore:
Timestamp:
10/14/2019 07:11:50 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.
  • Customizer: Properly sanitize background images.

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

Location:
branches/4.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.3

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

    r45982 r46499  
    10821082 */
    10831083function check_admin_referer( $action = -1, $query_arg = '_wpnonce' ) {
    1084         if ( -1 == $action )
    1085                 _doing_it_wrong( __FUNCTION__, __( 'You should specify a nonce action to be verified by using the first parameter.' ), '3.2' );
     1084        if ( -1 === $action )
     1085                _doing_it_wrong( __FUNCTION__, __( 'You should specify a nonce action to be verified by using the first parameter.' ), '3.2.0' );
    10861086
    10871087        $adminurl = strtolower(admin_url());
    … …  
    11001100        do_action( 'check_admin_referer', $action, $result );
    11011101
    1102         if ( ! $result && ! ( -1 == $action && strpos( $referer, $adminurl ) === 0 ) ) {
     1102        if ( ! $result && ! ( -1 === $action && strpos( $referer, $adminurl ) === 0 ) ) {
    11031103                wp_nonce_ays( $action );
    11041104                die();
    … …  
    11251125 */
    11261126function check_ajax_referer( $action = -1, $query_arg = false, $die = true ) {
     1127        if ( -1 === $action )
     1128                _doing_it_wrong( __FUNCTION__, __( 'You should specify a nonce action to be verified by using the first parameter.' ), '3.2.0' );
     1129
    11271130        $nonce = '';
    11281131
    … …  
    24072410}
    24082411endif;
    2409 
Note: See TracChangeset for help on using the changeset viewer.