Put a filter in wp_safe_redirect() so people can whitelist other domains. see #4606
git-svn-id: https://develop.svn.wordpress.org/trunk@6136 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7738085d0f
commit
38a6848169
@ -427,7 +427,9 @@ function wp_safe_redirect($location, $status = 302) {
|
||||
$lp = parse_url($location);
|
||||
$wpp = parse_url(get_option('home'));
|
||||
|
||||
if ( isset($lp['host']) && $lp['host'] != $wpp['host'] )
|
||||
$allowed_hosts = (array) apply_filters('allowed_redirect_hosts', array($wpp['host']));
|
||||
|
||||
if ( isset($lp['host']) && !in_array($lp['host'], $allowed_hosts) )
|
||||
$location = get_option('siteurl') . '/wp-admin/';
|
||||
|
||||
wp_redirect($location, $status);
|
||||
|
Loading…
Reference in New Issue
Block a user