jenkins-bot has submitted this change and it was merged.

Change subject: Don't do central login if not POSTed
......................................................................


Don't do central login if not POSTed

Only do the login redirect through the central login server in the
UserLoginComplete hook if the request was a POST.

Bug: 69834
Change-Id: I99e9981aa06e9d0ae7adfe692c35687dbebab315
(cherry picked from commit 402867dc08008f7515c22d34b2f15a64bab80473)
---
M CentralAuthHooks.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Reedy: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/CentralAuthHooks.php b/CentralAuthHooks.php
index 2a414b2..91bc898 100644
--- a/CentralAuthHooks.php
+++ b/CentralAuthHooks.php
@@ -521,7 +521,7 @@
                }
 
                // Check that this is actually for a special login page view
-               if ( $context->getTitle()->isSpecial( 'Userlogin' ) ) {
+               if ( $context->getTitle()->isSpecial( 'Userlogin' ) && 
$request->wasPosted() ) {
                        // User will be redirected to 
Special:CentralLogin/start (central wiki),
                        // then redirected back to 
Special:CentralLogin/complete (this wiki).
                        // Sanity check that "returnto" is not one of the 
central login pages. If it

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I99e9981aa06e9d0ae7adfe692c35687dbebab315
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: wmf/1.24wmf19
Gerrit-Owner: Reedy <[email protected]>
Gerrit-Reviewer: CSteipp <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to