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

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


git-svn-id: http://core.svn.wordpress.org/trunk@42722 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
ocean90 committed Apr 3, 2018
1 parent 921e131 commit 14bc2c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion wp-includes/version.php
Expand Up @@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.0-alpha-42891';
$wp_version = '5.0-alpha-42892';

/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
Expand Down
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 14bc2c0

Please sign in to comment.