From fe1e8af5891f675bc24aef76434c6ed1f26709f4 Mon Sep 17 00:00:00 2001 From: matt Date: Sun, 13 Nov 2005 04:38:56 +0000 Subject: [PATCH] Don't allow newlines in redirects git-svn-id: http://svn.automattic.com/wordpress/trunk@3060 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/pluggable-functions.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wp-includes/pluggable-functions.php b/wp-includes/pluggable-functions.php index 02d35205e1..3b67d31165 100644 --- a/wp-includes/pluggable-functions.php +++ b/wp-includes/pluggable-functions.php @@ -192,6 +192,8 @@ if ( !function_exists('wp_redirect') ) : function wp_redirect($location) { global $is_IIS; + $location = str_replace( array("\n", "\r"), '', $location); + if ($is_IIS) header("Refresh: 0;url=$location"); else