mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-20 03:16:12 +00:00
(captiveportal, new) failsafe, don't try to authenticate if handler not found
This commit is contained in:
parent
196da2bb5f
commit
192b6eb65d
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user