refactoring

This commit is contained in:
Roland Gruber 2025-08-25 20:53:52 +02:00
parent e894abf0ed
commit cbcb35aba4

View file

@ -128,7 +128,11 @@ if (isset($_POST['submit']) || isset($_POST['sig_response']) // WebAuthn
} }
} }
catch (Exception $e) { catch (Exception $e) {
logNewMessage(LOG_WARNING, '2-factor verification failed: ' . $e->getMessage()); $errorMessage = $e->getMessage();
if ($e->getPrevious() !== null) {
$errorMessage .= ' - ' . $e->getPrevious()->getMessage();
}
logNewMessage(LOG_WARNING, '2-factor verification failed: ' . $errorMessage);
header("HTTP/1.1 403 Forbidden"); header("HTTP/1.1 403 Forbidden");
} }
if ($twoFactorValid) { if ($twoFactorValid) {