EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
TOTP 160 bits
Yurii65bd2aca5de0
diff --git a/application/Espo/Core/Authentication/TwoFactor/Totp/Util.php b/application/Espo/Core/Authentication/TwoFactor/Totp/Util.phpindex 7f34c9c7bb..08d33644fc 100644--- a/application/Espo/Core/Authentication/TwoFactor/Totp/Util.php+++ b/application/Espo/Core/Authentication/TwoFactor/Totp/Util.php@@ -35,6 +35,8 @@ use RuntimeException;class Util{+ private const int BITS = 160;+public function verifyCode(string $secret, string $code): bool{$impl = new TwoFactorAuth();@@ -47,7 +49,7 @@ class Util$impl = new TwoFactorAuth();try {- return $impl->createSecret();+ return $impl->createSecret(self::BITS);} catch (TwoFactorAuthException $e) {throw new RuntimeException($e->getMessage());}