Make WordPress Core


Ignore:
Timestamp:
10/14/2019 07:16:30 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.1 branch.

Location:
branches/4.1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.1

  • branches/4.1/src/wp-includes/functions.php

    r44007 r46501  
    14921492    if ( file_exists( $target ) )
    14931493        return @is_dir( $target );
     1494
     1495    // Do not allow path traversals.
     1496    if ( false !== strpos( $target, '../' ) || false !== strpos( $target, '..' . DIRECTORY_SEPARATOR ) ) {
     1497        return false;
     1498    }
    14941499
    14951500    // We need to find the permissions of the parent folder that exists and inherit that.
Note: See TracChangeset for help on using the changeset viewer.