1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 01:25:56 +00:00

OTP: generate longer secrets, also make them easier to read/copy

This commit is contained in:
Andrew Dolgov
2021-03-29 19:22:03 +03:00
parent 0b82afabd5
commit 0acd33abe3
3 changed files with 9 additions and 5 deletions

View File

@@ -299,7 +299,7 @@ class UserHelper {
if ($user->otp_enabled) {
$user->otp_secret = $salt_based_secret;
} else {
$user->otp_secret = bin2hex(get_random_bytes(6));
$user->otp_secret = bin2hex(get_random_bytes(10));
}
$user->save();