fix: fix boolean return type in totp.php, handle multi-statement sql and enable error reporting
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user