From d614abe3a24eedeec6cd183a3df0876ab66f8ffe Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Mon, 1 Dec 2014 03:21:22 +0000 Subject: [PATCH] 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 --- wp-includes/pluggable.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index 639230f702..8f3a5de665 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -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 diff --git a/wp-includes/version.php b/wp-includes/version.php index 54934cd9a9..6ef00b3028 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.