Make WordPress Core

Changeset 58489


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

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

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

File:
1 edited

Legend:

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

    r54562 r58489  
    51055105 */
    51065106function validate_file( $file, $allowed_files = array() ) {
     5107    // Normalize path for Windows servers
     5108    $file = wp_normalize_path( $file );
     5109
    51075110    // `../` on its own is not allowed:
    51085111    if ( '../' === $file ) {
Note: See TracChangeset for help on using the changeset viewer.