Make WordPress Core


Ignore:
Timestamp:
09/19/2007 04:14:53 AM (17 years ago)
Author:
markjaquith
Message:

Put a filter in wp_safe_redirect() so people can whitelist other domains. see #4606

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/pluggable.php

    r6134 r6136  
    428428    $wpp = parse_url(get_option('home'));
    429429
    430     if ( isset($lp['host']) && $lp['host'] != $wpp['host'] )
     430    $allowed_hosts = (array) apply_filters('allowed_redirect_hosts', array($wpp['host']));
     431
     432    if ( isset($lp['host']) && !in_array($lp['host'], $allowed_hosts) )
    431433        $location = get_option('siteurl') . '/wp-admin/';
    432434
Note: See TracChangeset for help on using the changeset viewer.