From bcdde67ebd97b60a90abdf3bb0d8cbd87861b7ad Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Sat, 23 Mar 2024 00:33:23 +0100 Subject: [PATCH] Add explicit parentheses around mixed boolean operator Mixing different binary boolean operators within an expression without using parentheses to clarify precedence is not allowed (T358966) Change-Id: I908691348d259d868f39a7737614be82c9ce0c75 --- includes/Auth/CaptchaPreAuthenticationProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Auth/CaptchaPreAuthenticationProvider.php b/includes/Auth/CaptchaPreAuthenticationProvider.php index cd342e5bc..9f3bf1c30 100644 --- a/includes/Auth/CaptchaPreAuthenticationProvider.php +++ b/includes/Auth/CaptchaPreAuthenticationProvider.php @@ -59,7 +59,7 @@ class CaptchaPreAuthenticationProvider extends AbstractPreAuthenticationProvider if ( $loginCounter->isBadLoginTriggered() || $userProbablyNeedsCaptcha - || $suggestedUsername && $loginCounter->isBadLoginPerUserTriggered( $suggestedUsername ) + || ( $suggestedUsername && $loginCounter->isBadLoginPerUserTriggered( $suggestedUsername ) ) ) { $needed = true; $captcha->setAction( 'badlogin' );