Make WordPress Core

Changeset 58495


Ignore:
Timestamp:
06/24/2024 03:46:05 PM (5 months ago)
Author:
audrasjb
Message:

Editor: Fix Path Traversal issue on Windows in Template-Part Block.

Merges [58470] to the 4.7 branch.
Props xknown, jorbin.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/4.7/src/wp-includes/functions.php

    r57452 r58495  
    43544354 */
    43554355function validate_file( $file, $allowed_files = '' ) {
     4356    // Normalize path for Windows servers
     4357    $file = wp_normalize_path( $file );
     4358
    43564359    if ( false !== strpos( $file, '..' ) )
    43574360        return 1;
Note: See TracChangeset for help on using the changeset viewer.