Skip to content

Commit

Permalink
Login: Use wp_safe_redirect() when redirecting the login page if fo…
Browse files Browse the repository at this point in the history
…rced to use HTTPS.

Merge of [42892] to the 3.9 branch.

Built from https://develop.svn.wordpress.org/branches/3.9@42905


git-svn-id: http://core.svn.wordpress.org/branches/3.9@42735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
ocean90 committed Apr 3, 2018
1 parent e4a4b23 commit 19b1303
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wp-login.php
Expand Up @@ -14,10 +14,10 @@
// 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();
}
}
Expand Down

0 comments on commit 19b1303

Please sign in to comment.