Make WordPress Core


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

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

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

File:
1 edited

Legend:

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

    r54560 r58497  
    41184118 */
    41194119function validate_file( $file, $allowed_files = '' ) {
     4120    // Normalize path for Windows servers
     4121    $file = wp_normalize_path( $file );
     4122
    41204123    if ( false !== strpos( $file, '..' ) )
    41214124        return 1;
Note: See TracChangeset for help on using the changeset viewer.