[wp-trac] [WordPress Trac] #14062: some Location headers are using relative url's
WordPress Trac
wp-trac at lists.automattic.com
Sat Oct 2 04:28:49 UTC 2010
#14062: some Location headers are using relative url's
----------------------------+-----------------------------------------------
Reporter: hakre | Owner: dd32
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 3.1
Component: Administration | Version: 3.0
Severity: normal | Keywords:
----------------------------+-----------------------------------------------
Comment(by dd32):
I'm considering what we should accept for wp_redirect();
Right now, I'm thinking that the addition of a wp_admin_redirect() which
wraps the url with admin_url() before passing into wp_redirect() would be
useful.
The other possibility is something such as this in wp_redirect:
{{{
if ( ! is a absolute url starting with a scheme ) {
$url = is_admin() ? admin_url($url) : site_url($url);
}
}}}
That will catch more faulty redirects - but may break some plugins. In
core it's mainly admin redirects which do not specify a full url, and wp-
login.php.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14062#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list