1
0
mirror of https://tt-rss.org/git/tt-rss.git synced 2024-06-22 11:36:38 +02:00

auth_internal: fix OTP seed checking

This commit is contained in:
Andrew Dolgov 2019-11-01 10:34:31 +03:00
parent 904ecc31e2
commit 178bcd4349

View File

@ -36,7 +36,7 @@ class Auth_Internal extends Plugin implements IAuthModule {
$base32 = new \OTPHP\Base32();
$otp_enabled = $row['otp_enabled'];
$secret = $base32->encode(sha1($row['salt']));
$secret = $base32->encode(mb_substr(sha1($row["salt"]), 0, 12), false);
$topt = new \OTPHP\TOTP($secret);
$otp_check = $topt->now();