Skip to content

Commit 288cd46

Browse files
committed
Strip control characters before validating redirect.
Built from https://develop.svn.wordpress.org/trunk@40183 git-svn-id: http://core.svn.wordpress.org/trunk@40122 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 parent 9092fd0 commit 288cd46

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: wp-includes/pluggable.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1293,7 +1293,7 @@ function wp_safe_redirect($location, $status = 302) {
12931293
* @return string redirect-sanitized URL
12941294
**/
12951295
function wp_validate_redirect($location, $default = '') {
1296-
$location = trim( $location );
1296+
$location = trim( $location, " \t\n\r\0\x08\x0B" );
12971297
// browsers will assume 'http' is your protocol, and will obey a redirect to a URL starting with '//'
12981298
if ( substr($location, 0, 2) == '//' )
12991299
$location = 'http:' . $location;

Diff for: wp-includes/version.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* @global string $wp_version
66
*/
7-
$wp_version = '4.8-alpha-40181';
7+
$wp_version = '4.8-alpha-40183';
88

99
/**
1010
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

0 commit comments

Comments
 (0)