1
0
مراية لـ https://github.com/postalserver/postal.git تم المزامنة 2025-11-30 21:32:30 +00:00

refactor: switch to use SecureRandom for random strings

هذا الالتزام موجود في:
Adam Cooke
2024-03-04 17:33:25 +00:00
الأصل cae4b63599
التزام ce30c070bd
6 ملفات معدلة مع 6 إضافات و8 حذوفات

عرض الملف

@@ -30,7 +30,7 @@ module HasAuthentication
end
def begin_password_reset(return_to = nil)
self.password_reset_token = Nifty::Utils::RandomString.generate(length: 24)
self.password_reset_token = SecureRandom.alphanumeric(24)
self.password_reset_token_valid_until = 1.day.from_now
save!
AppMailer.password_reset(self, return_to).deliver