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

Change subject: Fix AbortLogin hook return value check
......................................................................


Fix AbortLogin hook return value check

Bug: T117027
Change-Id: Ia0a222058306bd7e3d1d090dca9976dee54dcc6d
---
M includes/specials/SpecialUserlogin.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Gergő Tisza: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/specials/SpecialUserlogin.php 
b/includes/specials/SpecialUserlogin.php
index 8864b98..bf79d63 100644
--- a/includes/specials/SpecialUserlogin.php
+++ b/includes/specials/SpecialUserlogin.php
@@ -784,7 +784,7 @@
                // Give general extensions, such as a captcha, a chance to 
abort logins
                $abort = self::ABORTED;
                if ( !Hooks::run( 'AbortLogin', array( $u, $this->mPassword, 
&$abort, &$msg ) ) ) {
-                       if ( !in_array( $abort, self::$statusCodes, true ) ) {
+                       if ( !in_array( $abort, array_keys( self::$statusCodes 
), true ) ) {
                                throw new Exception( 'Invalid status code 
returned from AbortLogin hook: ' . $abort );
                        }
                        $this->mAbortLoginErrorMsg = $msg;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia0a222058306bd7e3d1d090dca9976dee54dcc6d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.27.0-wmf.4
Gerrit-Owner: Gergő Tisza <[email protected]>
Gerrit-Reviewer: Gergő Tisza <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to