CSteipp has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/80331


Change subject: Use User Preference for logged-in HTTPS choice
......................................................................

Use User Preference for logged-in HTTPS choice

Use the user's preference, instead of the login-form checkbox, to
decide if the session cookies should be setup for HTTPS only.

Relies on core patch: I69e9cb23b8d700e821b8a961c672958e4e19e4f8

Change-Id: Ic7be49787f3ba0a1331081206c96ef7b67493b0d
---
M CentralAuthHooks.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth 
refs/changes/31/80331/1

diff --git a/CentralAuthHooks.php b/CentralAuthHooks.php
index 4d7b7a2..6ff447a 100644
--- a/CentralAuthHooks.php
+++ b/CentralAuthHooks.php
@@ -427,7 +427,7 @@
                        // Determine the final protocol of page, after login
                        $finalProto = $request->detectProtocol();
                        if ( $wgSecureLogin ) {
-                               $finalProto = $request->getCheck( 
'wpStickHTTPS' ) ? 'https' : 'http';
+                               $finalProto = $user->getBoolOption( 
'prefershttps' ) ? 'https' : 'http';
                        }
 
                        // When POSTs triggered from Special:CentralLogin/start 
are sent back to
@@ -441,7 +441,7 @@
                                'remember'      => $request->getCheck( 
'wpRemember' ),
                                'returnTo'      => $returnTo,
                                'returnToQuery' => $returnToQuery,
-                               'stickHTTPS'    => $request->getCheck( 
'wpStickHTTPS' ),
+                               'stickHTTPS'    => $user->getBoolOption( 
'prefershttps' ),
                                'finalProto'    => $finalProto,
                                'type'          => $request->getText( 'type' )
                        );

-- 
To view, visit https://gerrit.wikimedia.org/r/80331
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic7be49787f3ba0a1331081206c96ef7b67493b0d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: CSteipp <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to