Logged out warnings: fix same domain comparison in wp_auth_check_html() when FORCE_SSL_LOGIN && ! FORCE_SSL_ADMIN. See #23295
git-svn-id: https://develop.svn.wordpress.org/trunk@24266 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a9db6a4195
commit
978f89be64
|
@ -3921,10 +3921,13 @@ function wp_auth_check_load() {
|
||||||
* Output the HTML that shows the wp-login dialog when the user is no longer logged in
|
* Output the HTML that shows the wp-login dialog when the user is no longer logged in
|
||||||
*/
|
*/
|
||||||
function wp_auth_check_html() {
|
function wp_auth_check_html() {
|
||||||
$login_url = site_url( 'wp-login.php', 'login_post' );
|
$login_url = wp_login_url();
|
||||||
$current_domain = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'];
|
$current_domain = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'];
|
||||||
$same_domain = ( strpos( $login_url, $current_domain ) === 0 );
|
$same_domain = ( strpos( $login_url, $current_domain ) === 0 );
|
||||||
|
|
||||||
|
if ( $same_domain && force_ssl_login() && ! force_ssl_admin() )
|
||||||
|
$same_domain = false;
|
||||||
|
|
||||||
// Let plugins change this if they know better.
|
// Let plugins change this if they know better.
|
||||||
$same_domain = apply_filters( 'wp_auth_check_same_domain', $same_domain );
|
$same_domain = apply_filters( 'wp_auth_check_same_domain', $same_domain );
|
||||||
$wrap_class = $same_domain ? 'hidden' : 'hidden fallback';
|
$wrap_class = $same_domain ? 'hidden' : 'hidden fallback';
|
||||||
|
|
Loading…
Reference in New Issue