diff --git a/wp-login.php b/wp-login.php index 392615120e..14a6bfb4ee 100644 --- a/wp-login.php +++ b/wp-login.php @@ -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(); } }