Make WordPress Core

Changeset 58492


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

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

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

File:
1 edited

Legend:

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

    r54571 r58492  
    43484348 */
    43494349function validate_file( $file, $allowed_files = array() ) {
     4350    // Normalize path for Windows servers
     4351    $file = wp_normalize_path( $file );
     4352
    43504353    // `../` on its own is not allowed:
    43514354    if ( '../' === $file ) {
Note: See TracChangeset for help on using the changeset viewer.