Commit 4fb9629d authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

(captiveportal, new) failsafe, don't try to authenticate if handler not found

(cherry picked from commit 192b6eb6)
parent eee86007
......@@ -141,15 +141,17 @@ class AccessController extends ApiControllerBase
$authFactory = new AuthenticationFactory();
foreach (explode(',', (string)$cpZone->authservers) as $authServerName) {
$authServer = $authFactory->get(trim($authServerName));
// try this auth method
$isAuthenticated = $authServer->authenticate(
$userName,
$this->request->getPost("password", "string")
);
if ($authServer != null) {
// try this auth method
$isAuthenticated = $authServer->authenticate(
$userName,
$this->request->getPost("password", "string")
);
if ($isAuthenticated) {
// stop trying, when authenticated
break;
if ($isAuthenticated) {
// stop trying, when authenticated
break;
}
}
}
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment