Make WordPress Core

Changeset 58493


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

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

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

File:
1 edited

Legend:

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

    r54569 r58493  
    43134313 */
    43144314function validate_file( $file, $allowed_files = array() ) {
     4315    // Normalize path for Windows servers
     4316    $file = wp_normalize_path( $file );
     4317
    43154318    // `../` on its own is not allowed:
    43164319    if ( '../' === $file ) {
Note: See TracChangeset for help on using the changeset viewer.