Make WordPress Core

Changeset 58496


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

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

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

File:
1 edited

Legend:

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

    r57450 r58496  
    42694269 */
    42704270function validate_file( $file, $allowed_files = '' ) {
     4271    // Normalize path for Windows servers
     4272    $file = wp_normalize_path( $file );
     4273
    42714274    if ( false !== strpos( $file, '..' ) )
    42724275        return 1;
Note: See TracChangeset for help on using the changeset viewer.