mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-24 00:11:41 +01:00
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. Built from https://develop.svn.wordpress.org/trunk@46472 git-svn-id: http://core.svn.wordpress.org/trunk@46270 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e8fcc3fbe7
commit
9db44754b9
@ -1418,6 +1418,7 @@ if ( ! function_exists( 'wp_validate_redirect' ) ) :
|
|||||||
$path = '';
|
$path = '';
|
||||||
if ( ! empty( $_SERVER['REQUEST_URI'] ) ) {
|
if ( ! empty( $_SERVER['REQUEST_URI'] ) ) {
|
||||||
$path = dirname( parse_url( 'http://placeholder' . $_SERVER['REQUEST_URI'], PHP_URL_PATH ) . '?' );
|
$path = dirname( parse_url( 'http://placeholder' . $_SERVER['REQUEST_URI'], PHP_URL_PATH ) . '?' );
|
||||||
|
$path = wp_normalize_path( $path );
|
||||||
}
|
}
|
||||||
$location = '/' . ltrim( $path . '/', '/' ) . $location;
|
$location = '/' . ltrim( $path . '/', '/' ) . $location;
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.3-beta3-46471';
|
$wp_version = '5.3-beta3-46472';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user