Umherirrender has submitted this change and it was merged.

Change subject: Add hook to avoid sending redirects if needed
......................................................................


Add hook to avoid sending redirects if needed

I needed this to allow an SSO-authorized crawler to crawl the site.

The issue I experienced may be the result of bugs in earlier versions of
MediaWiki and/or the result of bugs in the crawler that I have no
ability to fix.

Bug: T126742
Change-Id: Iebc46db741410186508522fe2e50952c6c2915dc
---
M PluggableAuth.class.php
1 file changed, 3 insertions(+), 1 deletion(-)

Approvals:
  Cicalese: Verified; Looks good to me, approved
  Umherirrender: Verified; Looks good to me, approved



diff --git a/PluggableAuth.class.php b/PluggableAuth.class.php
index ff58ece..1d1de9d 100644
--- a/PluggableAuth.class.php
+++ b/PluggableAuth.class.php
@@ -287,7 +287,9 @@
                                $url .= $key . '=' . $value;
                        }
                }
-               $GLOBALS['wgOut']->redirect( $url );
+               if ( Hooks::run( 'PluggableAuthRedirect', array( &$url ) ) ) {
+                       $GLOBALS['wgOut']->redirect( $url );
+               }
        }
 
        /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iebc46db741410186508522fe2e50952c6c2915dc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PluggableAuth
Gerrit-Branch: master
Gerrit-Owner: MarkAHershberger <[email protected]>
Gerrit-Reviewer: Cicalese <[email protected]>
Gerrit-Reviewer: Umherirrender <[email protected]>

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

Reply via email to