Make WordPress Core

Changeset 58486


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

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

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

File:
1 edited

Legend:

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

    r54555 r58486  
    54375437 */
    54385438function validate_file( $file, $allowed_files = array() ) {
     5439    // Normalize path for Windows servers
     5440    $file = wp_normalize_path( $file );
     5441
    54395442    // `../` on its own is not allowed:
    54405443    if ( '../' === $file ) {
Note: See TracChangeset for help on using the changeset viewer.