Make WordPress Core


Ignore:
Timestamp:
06/24/2024 03:33:42 PM (6 months ago)
Author:
audrasjb
Message:

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

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

File:
1 edited

Legend:

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

    r54556 r58487  
    53555355 */
    53565356function validate_file( $file, $allowed_files = array() ) {
     5357    // Normalize path for Windows servers
     5358    $file = wp_normalize_path( $file );
     5359
    53575360    // `../` on its own is not allowed:
    53585361    if ( '../' === $file ) {
Note: See TracChangeset for help on using the changeset viewer.