CSteipp has uploaded a new change for review.

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


Change subject: Allow local wiki to act as central wiki
......................................................................

Allow local wiki to act as central wiki

During testing / rollout, if a wiki gets a request to do the central
login, but doesn't have $wgCentralAuthLoginWiki set, it will redirect
back to the local wiki. The local wiki is supposed to take over, and
pretend to be the central wiki for handling the central wiki's part of
the login handshake.

This fixes a regression that seems to have shown up in wmf9?

Change-Id: Ife44d2856f6116f410b8f0cfe33a39f865a10d35
---
M specials/SpecialCentralAutoLogin.php
1 file changed, 3 insertions(+), 1 deletion(-)


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

diff --git a/specials/SpecialCentralAutoLogin.php 
b/specials/SpecialCentralAutoLogin.php
index 7e61f03..db38679 100644
--- a/specials/SpecialCentralAutoLogin.php
+++ b/specials/SpecialCentralAutoLogin.php
@@ -360,7 +360,9 @@
        }
 
        private function checkIsCentralWiki( &$wikiId ) {
-               if ( wfWikiID() !== $this->loginWiki ) {
+               if ( wfWikiID() !== $this->loginWiki
+                       && wfWikiID() !== $this->getRequest()->getVal( 'from' ) 
// if origin is spoofing central
+               ) {
                        $this->doFinalOutput( false, 'Not central wiki' );
                        return false;
                }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ife44d2856f6116f410b8f0cfe33a39f865a10d35
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