Skip to content
Permalink
Browse files Browse the repository at this point in the history
Formatting: In wp_validate_redirect(), normalize the path when vali…
…dating 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
  • Loading branch information
SergeyBiryukov committed Oct 14, 2019
1 parent e8fcc3f commit 9db4475
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions wp-includes/pluggable.php
Expand Up @@ -1418,6 +1418,7 @@ function wp_validate_redirect( $location, $default = '' ) {
$path = '';
if ( ! empty( $_SERVER['REQUEST_URI'] ) ) {
$path = dirname( parse_url( 'http://placeholder' . $_SERVER['REQUEST_URI'], PHP_URL_PATH ) . '?' );
$path = wp_normalize_path( $path );
}
$location = '/' . ltrim( $path . '/', '/' ) . $location;
}
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/version.php
Expand Up @@ -13,7 +13,7 @@
*
* @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.
Expand Down

0 comments on commit 9db4475

Please sign in to comment.