From 8102bb87bcb28c5b8cdd037a0de248d7960d1950 Mon Sep 17 00:00:00 2001 From: Tyler Anthony Romeo Date: Mon, 8 Oct 2012 00:21:08 -0400 Subject: [PATCH] (bug 40679) Set $wgSecureLogin to false for $wgServers with schemes. When $wgServer has a scheme, force $wgSecureLogin to false in order to stop infinite redirects when trying to go to the login page. Change-Id: I5792eb1a54c7b6279aad0531cedf9f7b4bf94e6e --- includes/Setup.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/includes/Setup.php b/includes/Setup.php index 83ca516f06..f6c8245eb1 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -390,6 +390,11 @@ if ( !defined( 'MW_COMPILED' ) ) { wfProfileOut( $fname . '-includes' ); } +if ( $wgSecureLogin && substr( $wgServer, 0, 2 ) !== '//' ) { + $wgSecureLogin = false; + wfWarn( 'Secure login was enabled on a server that only supports HTTP or HTTPS. Disabling secure login.' ); +} + # Now that GlobalFunctions is loaded, set defaults that depend # on it. if ( $wgTmpDirectory === false ) { -- 2.20.1