Make WordPress Core


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

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

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

File:
1 edited

Legend:

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

    r54548 r58484  
    57895789 */
    57905790function validate_file( $file, $allowed_files = array() ) {
     5791    // Normalize path for Windows servers
     5792    $file = wp_normalize_path( $file );
     5793
    57915794    // `../` on its own is not allowed:
    57925795    if ( '../' === $file ) {
Note: See TracChangeset for help on using the changeset viewer.