Make WordPress Core


Ignore:
Timestamp:
10/14/2019 07:08:52 PM (6 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.4 branch.

Location:
branches/4.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.4

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

    r45981 r46498  
    11021102 */
    11031103function check_admin_referer( $action = -1, $query_arg = '_wpnonce' ) {
    1104     if ( -1 == $action )
    1105         _doing_it_wrong( __FUNCTION__, __( 'You should specify a nonce action to be verified by using the first parameter.' ), '3.2' );
     1104    if ( -1 === $action )
     1105        _doing_it_wrong( __FUNCTION__, __( 'You should specify a nonce action to be verified by using the first parameter.' ), '3.2.0' );
    11061106
    11071107    $adminurl = strtolower(admin_url());
     
    11201120    do_action( 'check_admin_referer', $action, $result );
    11211121
    1122     if ( ! $result && ! ( -1 == $action && strpos( $referer, $adminurl ) === 0 ) ) {
     1122    if ( ! $result && ! ( -1 === $action && strpos( $referer, $adminurl ) === 0 ) ) {
    11231123        wp_nonce_ays( $action );
    11241124        die();
     
    11451145 */
    11461146function check_ajax_referer( $action = -1, $query_arg = false, $die = true ) {
     1147    if ( -1 === $action )
     1148        _doing_it_wrong( __FUNCTION__, __( 'You should specify a nonce action to be verified by using the first parameter.' ), '3.2.0' );
     1149
    11471150    $nonce = '';
    11481151
     
    24942497}
    24952498endif;
    2496 
Note: See TracChangeset for help on using the changeset viewer.