Make WordPress Core

Changeset 58485


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

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

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

File:
1 edited

Legend:

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

    r54553 r58485  
    54395439 */
    54405440function validate_file( $file, $allowed_files = array() ) {
     5441    // Normalize path for Windows servers
     5442    $file = wp_normalize_path( $file );
     5443
    54415444    // `../` on its own is not allowed:
    54425445    if ( '../' === $file ) {
Note: See TracChangeset for help on using the changeset viewer.