Make WordPress Core

Changeset 58500


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

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

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

File:
1 edited

Legend:

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

    r54554 r58500  
    37823782 */
    37833783function validate_file( $file, $allowed_files = '' ) {
     3784    // Normalize path for Windows servers
     3785    $file = wp_normalize_path( $file );
     3786
    37843787    if ( false !== strpos( $file, '..' ) )
    37853788        return 1;
Note: See TracChangeset for help on using the changeset viewer.