mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-14 09:34:41 +00:00
Allow brackets in a URL when it's sanitised for a redirect. Brackets are valid in query parameters.
Fixes #30308 Props voldemortensen git-svn-id: https://develop.svn.wordpress.org/trunk@30684 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user