IAlex has uploaded a new change for review.

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


Change subject: Fix login with temporary password with $wgSecureLogin = true
......................................................................

Fix login with temporary password with $wgSecureLogin = true

The problem is that FauxRequest sets the protocol to http by default,
thus triggering the redirect when executing Special:UserLogin in the
background to log the user in after having reset his password.

DerivativeRequest is now used instead of FauxRequest so that the
protocol is correctly forwarded, and the redirect will not be
triggered.

Bug: 57289
Change-Id: I252351ff7d446283c9d1ab5f79b5cdbce71b76e0
---
M RELEASE-NOTES-1.22
M includes/specials/SpecialChangePassword.php
2 files changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/70/96970/1

diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22
index 333696b..e9ec416 100644
--- a/RELEASE-NOTES-1.22
+++ b/RELEASE-NOTES-1.22
@@ -355,6 +355,8 @@
   This resolves an infinite loop when using $wgDebugFunctionEntry = true.
 * (bug 56707) Correct tooltip of "Next n results" on query special pages.
 * (bug 56770) mw.util.addPortletLink: Check length before access array index.
+* (bug 57289) Logging in with a temporary password is no longer broken when
+  $wgSecureLogin is true.
 
 === API changes in 1.22 ===
 * (bug 25553) The JSON output formatter now leaves forward slashes unescaped
diff --git a/includes/specials/SpecialChangePassword.php 
b/includes/specials/SpecialChangePassword.php
index 8b96e6c..43a4d2c 100644
--- a/includes/specials/SpecialChangePassword.php
+++ b/includes/specials/SpecialChangePassword.php
@@ -99,7 +99,7 @@
                                                'wpLoginToken' => $token,
                                                'wpPassword' => 
$request->getVal( 'wpNewPassword' ),
                                        ) + $request->getValues( 'wpRemember', 
'returnto', 'returntoquery' );
-                                       $login = new LoginForm( new 
FauxRequest( $data, true ) );
+                                       $login = new LoginForm( new 
DerivativeRequest( $request, $data, true ) );
                                        $login->setContext( $this->getContext() 
);
                                        $login->execute( null );
                                }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I252351ff7d446283c9d1ab5f79b5cdbce71b76e0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: IAlex <coderev...@emsenhuber.ch>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to