Make WordPress Core

Changeset 58494


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

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

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

File:
1 edited

Legend:

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

    r57453 r58494  
    43554355 */
    43564356function validate_file( $file, $allowed_files = '' ) {
     4357    // Normalize path for Windows servers
     4358    $file = wp_normalize_path( $file );
     4359
    43574360    if ( false !== strpos( $file, '..' ) )
    43584361        return 1;
Note: See TracChangeset for help on using the changeset viewer.