MarkAHershberger has uploaded a new change for review.

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

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(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PluggableAuth 
refs/changes/07/270307/1

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: newchange
Gerrit-Change-Id: Iebc46db741410186508522fe2e50952c6c2915dc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PluggableAuth
Gerrit-Branch: master
Gerrit-Owner: MarkAHershberger <[email protected]>

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

Reply via email to