Make WordPress Core

Changeset 58501


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

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

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

File:
1 edited

Legend:

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

    r54552 r58501  
    37693769 */
    37703770function validate_file( $file, $allowed_files = '' ) {
     3771    // Normalize path for Windows servers
     3772    $file = wp_normalize_path( $file );
     3773
    37713774    if ( false !== strpos( $file, '..' ) )
    37723775        return 1;
Note: See TracChangeset for help on using the changeset viewer.