Make WordPress Core


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

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

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

File:
1 edited

Legend:

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

    r54559 r58488  
    52975297 */
    52985298function validate_file( $file, $allowed_files = array() ) {
     5299    // Normalize path for Windows servers
     5300    $file = wp_normalize_path( $file );
     5301
    52995302    // `../` on its own is not allowed:
    53005303    if ( '../' === $file ) {
Note: See TracChangeset for help on using the changeset viewer.