Commit 192b6eb6 authored by Ad Schellevis's avatar Ad Schellevis

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

parent 196da2bb
......@@ -141,6 +141,7 @@ class AccessController extends ApiControllerBase
$authFactory = new AuthenticationFactory();
foreach (explode(',', (string)$cpZone->authservers) as $authServerName) {
$authServer = $authFactory->get(trim($authServerName));
if ($authServer != null) {
// try this auth method
$isAuthenticated = $authServer->authenticate(
$userName,
......@@ -152,6 +153,7 @@ class AccessController extends ApiControllerBase
break;
}
}
}
} else {
// no authentication needed, set username to "anonymous@ip"
$userName = "anonymous@" . $clientIp;
......
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