From 000bbba87b6cb38bfc4796e770060b272f4ede03 Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Wed, 10 Oct 2007 19:25:23 +0000 Subject: [PATCH] check for a match against a lowercase host in wp_safe_redirect(). props BoltClock. fixes #5114 for trunk git-svn-id: https://develop.svn.wordpress.org/trunk@6219 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 3f60779c39..c0a10e2297 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -437,7 +437,7 @@ function wp_safe_redirect($location, $status = 302) { $allowed_hosts = (array) apply_filters('allowed_redirect_hosts', array($wpp['host']), $lp['host']); - if ( isset($lp['host']) && !in_array($lp['host'], $allowed_hosts) ) + if ( isset($lp['host']) && ( !in_array($lp['host'], $allowed_hosts) && $lp['host'] != strtolower($wpp['host'])) ) $location = get_option('siteurl') . '/wp-admin/'; wp_redirect($location, $status);