Strengthen some crypto (#8061)

For login, tokens, nonces
This commit is contained in:
Alexandre Alapetite authored and GitHub committed 2025-10-04 14:32:18 +02:00
1 parent be49726ebb
commit 57e1a375cb
6 files changed
+8 -11

No files matched your search

+1 -2
View File
@@ -41,8 +41,7 @@ class FreshRSS_user_Controller extends FreshRSS_ActionController {
$userConfig->mail_login = $email;
if (FreshRSS_Context::systemConf()->force_email_validation) {
$salt = FreshRSS_Context::systemConf()->salt;
$userConfig->email_validation_token = sha1($salt . uniqid('' . mt_rand(), true));
$userConfig->email_validation_token = hash('sha256', FreshRSS_Context::systemConf()->salt . $email . random_bytes(32));
$mailer = new FreshRSS_User_Mailer();
$mailer->send_email_need_validation($user, $userConfig);
}