Pass the attempted redirect host as a second parameter in the allowed_redirect_hosts filter. props mdawaffe.

git-svn-id: http://svn.automattic.com/wordpress/trunk@6145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2007-09-20 21:53:42 +00:00
parent 40b7e58b82
commit 5177c0e5c7

View File

@ -434,7 +434,7 @@ function wp_safe_redirect($location, $status = 302) {
$lp = parse_url($location);
$wpp = parse_url(get_option('home'));
$allowed_hosts = (array) apply_filters('allowed_redirect_hosts', array($wpp['host']));
$allowed_hosts = (array) apply_filters('allowed_redirect_hosts', array($wpp['host']), $lp['host']);
if ( isset($lp['host']) && !in_array($lp['host'], $allowed_hosts) )
$location = get_option('siteurl') . '/wp-admin/';