Make WordPress Core


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

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

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

File:
1 edited

Legend:

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

    r54570 r58491  
    47914791 */
    47924792function validate_file( $file, $allowed_files = array() ) {
     4793    // Normalize path for Windows servers
     4794    $file = wp_normalize_path( $file );
     4795
    47934796    // `../` on its own is not allowed:
    47944797    if ( '../' === $file ) {
Note: See TracChangeset for help on using the changeset viewer.