From 7028e093b6a370403642ff68a6cb62e919632283 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 27 Jun 2006 01:42:52 +0000 Subject: [PATCH] More thorough URI sanitizer in wp_redirect(). git-svn-id: https://develop.svn.wordpress.org/trunk@3926 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/pluggable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index 6c09db0740..1f767e1d4c 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -283,7 +283,7 @@ if ( !function_exists('wp_redirect') ) : function wp_redirect($location) { global $is_IIS; - $location = str_replace( array("\n", "\r"), '', $location); + $location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $location); if ($is_IIS) header("Refresh: 0;url=$location");