mirror of
https://github.com/neocities/neocities.git
synced 2025-08-03 08:11:56 +02:00
fixes to password reset
This commit is contained in:
parent
82195a9cb8
commit
6245319bc1
2 changed files with 4 additions and 2 deletions
4
app.rb
4
app.rb
|
@ -375,9 +375,8 @@ post '/send_password_reset' do
|
|||
site = Site[email: params[:email]]
|
||||
|
||||
if site
|
||||
site.update password_reset_token: token
|
||||
|
||||
token = SecureRandom.uuid.gsub('-', '')
|
||||
site.update password_reset_token: token
|
||||
|
||||
body = <<-EOT
|
||||
Hello! This is the NeoCities cat, and I have received a password reset request for your e-mail address. Purrrr.
|
||||
|
@ -393,6 +392,7 @@ the NeoCities Cat
|
|||
body.strip!
|
||||
|
||||
EmailWorker.perform_async({
|
||||
from: 'web@neocities.org',
|
||||
to: params[:email],
|
||||
subject: '[NeoCities] Password Reset',
|
||||
body: body
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue