Demon has uploaded a new change for review.
https://gerrit.wikimedia.org/r/76823
Change subject: Remove "stick HTTPS" option from login page
......................................................................
Remove "stick HTTPS" option from login page
Change-Id: I99d78246c337ebf491f56129a4b136338efce79e
---
M includes/specials/SpecialUserlogin.php
M includes/templates/Userlogin.php
M languages/messages/MessagesEn.php
M maintenance/language/messages.inc
4 files changed, 5 insertions(+), 38 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/23/76823/1
diff --git a/includes/specials/SpecialUserlogin.php
b/includes/specials/SpecialUserlogin.php
index 6e557f3..ad664ed 100644
--- a/includes/specials/SpecialUserlogin.php
+++ b/includes/specials/SpecialUserlogin.php
@@ -46,7 +46,7 @@
var $mUsername, $mPassword, $mRetype, $mReturnTo, $mCookieCheck,
$mPosted;
var $mAction, $mCreateaccount, $mCreateaccountMail;
var $mLoginattempt, $mRemember, $mEmail, $mDomain, $mLanguage;
- var $mSkipCookieCheck, $mReturnToQuery, $mToken, $mStickHTTPS;
+ var $mSkipCookieCheck, $mReturnToQuery, $mToken;
var $mType, $mReason, $mRealName;
var $mAbortLoginErrorMsg = 'login-abort-generic';
private $mLoaded = false;
@@ -105,7 +105,6 @@
$this->mLoginattempt = $request->getCheck( 'wpLoginattempt' );
$this->mAction = $request->getVal( 'action' );
$this->mRemember = $request->getCheck( 'wpRemember' );
- $this->mStickHTTPS = $request->getCheck( 'wpStickHTTPS' );
$this->mLanguage = $request->getText( 'uselang' );
$this->mSkipCookieCheck = $request->getCheck(
'wpSkipCookieCheck' );
$this->mToken = ( $this->mType == 'signup' ) ?
$request->getVal( 'wpCreateaccountToken' ) : $request->getVal( 'wpLoginToken' );
@@ -174,8 +173,7 @@
$title = $this->getFullTitle();
$query = array(
'returnto' => $this->mReturnTo,
- 'returntoquery' => $this->mReturnToQuery,
- 'wpStickHTTPS' => $this->mStickHTTPS
+ 'returntoquery' => $this->mReturnToQuery
);
$url = $title->getFullURL( $query, false, PROTO_HTTPS );
if ( $wgSecureLogin ) {
@@ -747,7 +745,7 @@
$user->invalidateCache();
}
- if ( $wgSecureLogin && !$this->mStickHTTPS ) {
+ if ( $wgSecureLogin ) {
$user->setCookies( null, false );
} else {
$user->setCookies();
@@ -972,15 +970,11 @@
* - successredirect: send an HTTP redirect using $wgRedirectOnLogin
if needed
* @param string $returnTo
* @param array|string $returnToQuery
- * @param bool $stickHTTPs Keep redirect link on HTTPs
* @since 1.22
*/
- public function showReturnToPage(
- $type, $returnTo = '', $returnToQuery = '', $stickHTTPs = false
- ) {
+ public function showReturnToPage( $type, $returnTo = '', $returnToQuery
= '' ) {
$this->mReturnTo = $returnTo;
$this->mReturnToQuery = $returnToQuery;
- $this->mStickHTTPS = $stickHTTPs;
$this->executeReturnTo( $type );
}
@@ -1008,10 +1002,7 @@
$returnToTitle = Title::newMainPage();
}
- if ( $wgSecureLogin && !$this->mStickHTTPS ) {
- $options = array( 'http' );
- $proto = PROTO_HTTP;
- } elseif ( $wgSecureLogin ) {
+ if ( $wgSecureLogin ) {
$options = array( 'https' );
$proto = PROTO_HTTPS;
} else {
@@ -1117,11 +1108,6 @@
$template->set( 'link', '' );
}
- // Decide if we default stickHTTPS on
- if ( $wgSecureLoginDefaultHTTPS && $this->mAction !=
'submitlogin' && !$this->mLoginattempt ) {
- $this->mStickHTTPS = true;
- }
-
$resetLink = $this->mType == 'signup'
? null
: is_array( $wgPasswordResetRoutes ) && in_array( true,
array_values( $wgPasswordResetRoutes ) );
@@ -1151,7 +1137,6 @@
$template->set( 'usereason', $user->isLoggedIn() );
$template->set( 'remember', $user->getOption(
'rememberpassword' ) || $this->mRemember );
$template->set( 'cansecurelogin', ( $wgSecureLogin === true ) );
- $template->set( 'stickHTTPS', $this->mStickHTTPS );
if ( $this->mType === 'signup' && $user->isLoggedIn() ) {
$template->set( 'createAnother', true );
@@ -1297,9 +1282,6 @@
*/
private function renewSessionId() {
global $wgSecureLogin, $wgCookieSecure;
- if ( $wgSecureLogin && !$this->mStickHTTPS ) {
- $wgCookieSecure = false;
- }
// If either we don't trust PHP's entropy, or if we need
// to change cookie settings when logging in because of
diff --git a/includes/templates/Userlogin.php b/includes/templates/Userlogin.php
index b9825a6..d077cac 100644
--- a/includes/templates/Userlogin.php
+++ b/includes/templates/Userlogin.php
@@ -150,19 +150,6 @@
</label>
<?php } ?>
</div>
-
- <?php if ( $this->data['cansecurelogin'] ) { ?>
- <div>
- <label class="mw-ui-checkbox-label">
- <input name="wpStickHTTPS" type="checkbox"
value="1" id="wpStickHTTPS" tabindex="5"
- <?php if ( $this->data['stickHTTPS'] ) {
- echo 'checked="checked"';
- } ?>
- >
- <?php $this->msg( 'securelogin-stick-https' );
?>
- </label>
- </div>
- <?php } ?>
<div>
<?php
echo Html::input( 'wpLoginAttempt', $this->getMsg(
'login' )->text(), 'submit', array(
diff --git a/languages/messages/MessagesEn.php
b/languages/messages/MessagesEn.php
index 3c616db..c648176 100644
--- a/languages/messages/MessagesEn.php
+++ b/languages/messages/MessagesEn.php
@@ -1113,7 +1113,6 @@
'remembermypassword' => 'Remember my login on this browser (for a
maximum of $1 {{PLURAL:$1|day|days}})',
'userlogin-remembermypassword' => 'Keep me logged in',
'userlogin-signwithsecure' => 'Use secure connection',
-'securelogin-stick-https' => 'Stay connected to HTTPS after login',
'yourdomainname' => 'Your domain:',
'password-change-forbidden' => 'You cannot change passwords on this
wiki.',
'externaldberror' => 'There was either an authentication
database error or you are not allowed to update your external account.',
diff --git a/maintenance/language/messages.inc
b/maintenance/language/messages.inc
index 388904a..73727c0 100644
--- a/maintenance/language/messages.inc
+++ b/maintenance/language/messages.inc
@@ -460,7 +460,6 @@
'remembermypassword',
'userlogin-remembermypassword',
'userlogin-signwithsecure',
- 'securelogin-stick-https',
'yourdomainname',
'password-change-forbidden',
'externaldberror',
--
To view, visit https://gerrit.wikimedia.org/r/76823
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I99d78246c337ebf491f56129a4b136338efce79e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Demon <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits