Make WordPress Core

Changeset 58490


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

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

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

File:
1 edited

Legend:

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

    r54563 r58490  
    48974897 */
    48984898function validate_file( $file, $allowed_files = array() ) {
     4899    // Normalize path for Windows servers
     4900    $file = wp_normalize_path( $file );
     4901
    48994902    // `../` on its own is not allowed:
    49004903    if ( '../' === $file ) {
Note: See TracChangeset for help on using the changeset viewer.