Make WordPress Core


Ignore:
Timestamp:
10/14/2019 10:50:41 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Formatting: In wp_validate_redirect(), normalize the path when validating the location for relative URLs, to account for Windows paths.

Props peterwilsoncc, rconde, jmmathc, mat-lipe, Sixes, justinahinon, cmagrin, daxelrod, SergeyBiryukov.
Fixes #47980.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/pluggable.php

    r46467 r46472  
    14191419            if ( ! empty( $_SERVER['REQUEST_URI'] ) ) {
    14201420                $path = dirname( parse_url( 'http://placeholder' . $_SERVER['REQUEST_URI'], PHP_URL_PATH ) . '?' );
     1421                $path = wp_normalize_path( $path );
    14211422            }
    14221423            $location = '/' . ltrim( $path . '/', '/' ) . $location;
Note: See TracChangeset for help on using the changeset viewer.