mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-28 15:17:42 +02:00
Formatting: Ensure that wp_validate_redirect()
sanitizes a wider variety of characters.
Props: xknow, vortfu. Built from https://develop.svn.wordpress.org/trunk@47949 git-svn-id: http://core.svn.wordpress.org/trunk@47721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7e9267567f
commit
10e2a50c52
@ -1412,7 +1412,7 @@ if ( ! function_exists( 'wp_validate_redirect' ) ) :
|
|||||||
* @return string redirect-sanitized URL
|
* @return string redirect-sanitized URL
|
||||||
*/
|
*/
|
||||||
function wp_validate_redirect( $location, $default = '' ) {
|
function wp_validate_redirect( $location, $default = '' ) {
|
||||||
$location = trim( $location, " \t\n\r\0\x08\x0B" );
|
$location = wp_sanitize_redirect( trim( $location, " \t\n\r\0\x08\x0B" ) );
|
||||||
// Browsers will assume 'http' is your protocol, and will obey a redirect to a URL starting with '//'.
|
// Browsers will assume 'http' is your protocol, and will obey a redirect to a URL starting with '//'.
|
||||||
if ( '//' === substr( $location, 0, 2 ) ) {
|
if ( '//' === substr( $location, 0, 2 ) ) {
|
||||||
$location = 'http:' . $location;
|
$location = 'http:' . $location;
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.5-alpha-47948';
|
$wp_version = '5.5-alpha-47949';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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