Skip to content

Commit 14bc2c0

Browse files
committed
Login: Use wp_safe_redirect() when redirecting the login page if forced 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
1 parent 921e131 commit 14bc2c0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: wp-includes/version.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* @global string $wp_version
66
*/
7-
$wp_version = '5.0-alpha-42891';
7+
$wp_version = '5.0-alpha-42892';
88

99
/**
1010
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

Diff for: wp-login.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
// Redirect to https login if forced to use SSL
1515
if ( force_ssl_admin() && ! is_ssl() ) {
1616
if ( 0 === strpos( $_SERVER['REQUEST_URI'], 'http' ) ) {
17-
wp_redirect( set_url_scheme( $_SERVER['REQUEST_URI'], 'https' ) );
17+
wp_safe_redirect( set_url_scheme( $_SERVER['REQUEST_URI'], 'https' ) );
1818
exit();
1919
} else {
20-
wp_redirect( 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
20+
wp_safe_redirect( 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
2121
exit();
2222
}
2323
}

0 commit comments

Comments
 (0)