1
0
Fork 0
mirror of synced 2024-05-17 11:12:41 +12:00

Update app/controllers/shared/api.php

Co-authored-by: Jake Barnby <jakeb994@gmail.com>
This commit is contained in:
Bradley Schofield 2024-04-23 16:34:12 +09:00 committed by GitHub
parent 3d17b64eac
commit 089af4e137
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -290,7 +290,7 @@ App::init()
$minimumFactors = ($mfaEnabled && $hasMoreFactors) ? 2 : 1;
if (!in_array('mfa', $route->getGroups())) {
if ($session && !empty($session->getAttribute('factors')) && \count($session->getAttribute('factors')) < $minimumFactors) {
if ($session && \count($session->getAttribute('factors', [])) < $minimumFactors) {
throw new Exception(Exception::USER_MORE_FACTORS_REQUIRED);
}
}