Changeset 6136

Show
Ignore:
Timestamp:
09/19/07 04:14:53 (1 year ago)
Author:
markjaquith
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 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