fix: fix boolean return type in totp.php, handle multi-statement sql and enable error reporting

This commit is contained in:
2026-09-08 14:03:47 +02:00
parent 36e38b4df3
commit 17b0557d1d
6 changed files with 29 additions and 8 deletions
+1 -1
View File
@@ -76,7 +76,7 @@ class TOTP {
/**
* Verifieert een ingevoerde 6-cijferige 2FA code (met 1 tijdstap speling naar voor/achter)
*/
public static function verifyCode(string $secret, string $userInputCode, int $window = 1): boolean {
public static function verifyCode(string $secret, string $userInputCode, int $window = 1): bool {
$userInputCode = trim(str_replace(' ', '', $userInputCode));
if (strlen($userInputCode) !== 6 || !ctype_digit($userInputCode)) {
return false;