From: Tyler Romeo Date: Fri, 10 Aug 2012 20:27:13 +0000 (-0400) Subject: (bug 33471) Changed detection of secure cookies. X-Git-Tag: 1.31.0-rc.0~22736^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/%7B%7B%20url_for%28%27admin_users%27%29%20%7D%7D?a=commitdiff_plain;h=71b03dd4994b0e0cefa800411e3e60a8ebcc6f30;p=lhc%2Fweb%2Fwiklou.git (bug 33471) Changed detection of secure cookies. Changed code in Setup.php that checks whether or not to use secure cookies. Previously it just looked at $wgServer, which doesn't work with protocol-relative URLs. Now it uses WebRequest::detectProtocol(), which in turn checks $_SERVER. Change-Id: I6adc7e3e9bd224608b13cbb748bdd2b61edaa764 Signed-off-by: Tyler Romeo --- diff --git a/includes/Setup.php b/includes/Setup.php index 518ef6d86e..baf7b35506 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -372,7 +372,7 @@ if ( $wgNewUserLog ) { } if ( $wgCookieSecure === 'detect' ) { - $wgCookieSecure = ( substr( $wgServer, 0, 6 ) === 'https:' ); + $wgCookieSecure = ( WebRequest::detectProtocol() === 'https:' ); } // Disable MWDebug for command line mode, this prevents MWDebug from eating up