Skip to content
Snippets Groups Projects
Verified Commit a4e16a10 authored by Peter Bolha's avatar Peter Bolha :ok_hand_tone1:
Browse files

fix: enable backup code checking

parent 90f4fc88
No related branches found
No related tags found
1 merge request!25Fix TOTP failcounter handling
Pipeline #359211 passed
......@@ -103,7 +103,7 @@ class Utils
self::handlePrivacyIDEAException($e, $state);
}
}
} else {
} elseif ($formParams['mode'] === 'totp') {
try {
// limit otp validation to totp tokens to prevent incrementing of webauthn failcounter
$params["type"] = "totp";
......@@ -123,6 +123,13 @@ class Utils
} catch (\Exception $e) {
self::handlePrivacyIDEAException($e, $state);
}
} else {
// Backup code validation
try {
$response = $pi->validateCheck($username, $formParams['otp'], $transactionID);
} catch (\Exception $e) {
self::handlePrivacyIDEAException($e, $state);
}
}
$counter = $formParams['loadCounter'];
$state['privacyidea:privacyidea:ui']['loadCounter'] = $counter + 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment