From c04f336ba4f36a3c8350ff7a3446d10172fc721e Mon Sep 17 00:00:00 2001 From: Tim van Dijen Date: Fri, 8 May 2026 10:51:53 +0200 Subject: [PATCH] Do not try other servers if authn failed --- src/Auth/Source/Radius.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Auth/Source/Radius.php b/src/Auth/Source/Radius.php index 3d61105..39b11d3 100644 --- a/src/Auth/Source/Radius.php +++ b/src/Auth/Source/Radius.php @@ -163,8 +163,9 @@ protected function login( $radius->setRadiusSuffix('@' . $this->realm); } $response = $radius->accessRequest($username, $password); - - if ($response !== false) { + $errorCode = $radius->getErrorCode(); + if ($response !== false || $errorCode === $radius::TYPE_ACCESS_REJECT) { + // Either we succeeded or the authentication failed. No need to try any secondary servers break; } }