mirror of
git://develop.git.wordpress.org/
synced 2025-01-17 21:08:44 +01:00
Login: Use wp_safe_redirect()
when redirecting the login page if forced to use HTTPS.
Merge of [42892] to the 4.7 branch. git-svn-id: https://develop.svn.wordpress.org/branches/4.7@42897 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
54a3c366e5
commit
6d5d03d9a1
@ -14,10 +14,10 @@ require( dirname(__FILE__) . '/wp-load.php' );
|
||||
// Redirect to https login if forced to use SSL
|
||||
if ( force_ssl_admin() && ! is_ssl() ) {
|
||||
if ( 0 === strpos($_SERVER['REQUEST_URI'], 'http') ) {
|
||||
wp_redirect( set_url_scheme( $_SERVER['REQUEST_URI'], 'https' ) );
|
||||
wp_safe_redirect( set_url_scheme( $_SERVER['REQUEST_URI'], 'https' ) );
|
||||
exit();
|
||||
} else {
|
||||
wp_redirect( 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
|
||||
wp_safe_redirect( 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user