WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/14/2019 07:06:04 PM (22 months 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.5 branch.

Location:
branches/4.5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.5

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

    r45980 r46497  
    10451045 */
    10461046function check_admin_referer( $action = -1, $query_arg = '_wpnonce' ) {
    1047     if ( -1 == $action )
    1048         _doing_it_wrong( __FUNCTION__, __( 'You should specify a nonce action to be verified by using the first parameter.' ), '3.2' );
     1047    if ( -1 === $action )
     1048        _doing_it_wrong( __FUNCTION__, __( 'You should specify a nonce action to be verified by using the first parameter.' ), '3.2.0' );
    10491049
    10501050    $adminurl = strtolower(admin_url());
     
    10631063    do_action( 'check_admin_referer', $action, $result );
    10641064
    1065     if ( ! $result && ! ( -1 == $action && strpos( $referer, $adminurl ) === 0 ) ) {
     1065    if ( ! $result && ! ( -1 === $action && strpos( $referer, $adminurl ) === 0 ) ) {
    10661066        wp_nonce_ays( $action );
    10671067        die();
     
    10881088 */
    10891089function check_ajax_referer( $action = -1, $query_arg = false, $die = true ) {
     1090    if ( -1 === $action )
     1091        _doing_it_wrong( __FUNCTION__, __( 'You should specify a nonce action to be verified by using the first parameter.' ), '3.2.0' );
     1092
    10901093    $nonce = '';
    10911094
     
    24482451}
    24492452endif;
    2450 
Note: See TracChangeset for help on using the changeset viewer.