WordPress/wp-includes
Jeremy Felt 27e29666a8 Multisite: Handle redirect to a user's subdomain properly during login
`wp-login.php` uses `wp_safe_redirect()` for all redirects, even those that do not involve unsafe data from the request or referer.

When a user of a subdomain site attempts to login to a network site they do not have access to, the host in the redirect URL is treated as unsafe by `wp_safe_redirect()` as it has no immediate awareness as to which hosts are valid on the network. On a subdirectoy network, everything works as expected because the host is the same.

In this specific block of `wp-login.php`, all URLs are generated by WordPress and we can use `wp_redirect()` to handle the redirects. Users authenticating via other network sites will now be redirected properly. Hosts passed via the `redirect_to` query var will continue to be handled by `wp_safe_redirect()`.

Fixes #30598.

Built from https://develop.svn.wordpress.org/trunk@36867


git-svn-id: http://core.svn.wordpress.org/trunk@36834 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-06 03:06:29 +00:00
..
2016-03-05 22:01:27 +00:00
2016-02-28 19:00:27 +00:00
2015-09-26 07:04:28 +00:00
2015-12-06 21:50:25 +00:00
2016-02-02 12:55:29 +00:00
2016-02-24 22:12:25 +00:00
2016-03-02 20:06:26 +00:00