Make WordPress Core

Changeset 58498


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

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

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

File:
1 edited

Legend:

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

    r54558 r58498  
    40154015 */
    40164016function validate_file( $file, $allowed_files = '' ) {
     4017    // Normalize path for Windows servers
     4018    $file = wp_normalize_path( $file );
     4019
    40174020    if ( false !== strpos( $file, '..' ) )
    40184021        return 1;
Note: See TracChangeset for help on using the changeset viewer.