Allow brackets in a URL when it's sanitised for a redirect. Brackets are valid in query parameters.

Fixes #30308
Props voldemortensen

Built from https://develop.svn.wordpress.org/trunk@30684


git-svn-id: http://core.svn.wordpress.org/trunk@30674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2014-12-01 03:21:22 +00:00
parent 17ddc06287
commit d614abe3a2
2 changed files with 2 additions and 2 deletions

View File

@ -1190,7 +1190,7 @@ if ( !function_exists('wp_sanitize_redirect') ) :
* @return string redirect-sanitized URL
**/
function wp_sanitize_redirect($location) {
$location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%!*\[\]]|i', '', $location);
$location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%!*\[\]()]|i', '', $location);
$location = wp_kses_no_null($location);
// remove %0d and %0a from location

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.1-beta2-30683';
$wp_version = '4.1-beta2-30684';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.