mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
more derpie bugs
This commit is contained in:
parent
0e4583a3bf
commit
0bdc09f840
1 changed files with 4 additions and 4 deletions
8
app.rb
8
app.rb
|
@ -444,7 +444,7 @@ post '/send_password_reset' do
|
||||||
body = <<-EOT
|
body = <<-EOT
|
||||||
Hello! This is the NeoCities cat, and I have received a password reset request for your e-mail address. Purrrr.
|
Hello! This is the NeoCities cat, and I have received a password reset request for your e-mail address. Purrrr.
|
||||||
|
|
||||||
Go to this URL to reset your password: http://neocities.org/password_reset_confirm?code=#{token}
|
Go to this URL to reset your password: http://neocities.org/password_reset_confirm?token=#{token}
|
||||||
|
|
||||||
After clicking on this link, your password for all the sites registered to this email address will be changed to this token.
|
After clicking on this link, your password for all the sites registered to this email address will be changed to this token.
|
||||||
|
|
||||||
|
@ -471,15 +471,15 @@ the NeoCities Cat
|
||||||
end
|
end
|
||||||
|
|
||||||
get '/password_reset_confirm' do
|
get '/password_reset_confirm' do
|
||||||
sites = Site.filter(password_reset_token: params[:code]).all
|
sites = Site.filter(password_reset_token: params[:token]).all
|
||||||
|
|
||||||
if sites.length < 0
|
if sites.length < 0
|
||||||
sites.each do |site|
|
sites.each do |site|
|
||||||
site.password = params[:code]
|
site.password = params[:token]
|
||||||
site.save
|
site.save
|
||||||
end
|
end
|
||||||
|
|
||||||
flash[:success] = 'Your password has been changed to the token sent in your e-mail. Please login and change your password in the settings page as soon as possible.'
|
flash[:success] = 'Your password for all sites with your email address has been changed to the token sent in your e-mail. Please login and change your password as soon as possible.'
|
||||||
else
|
else
|
||||||
flash[:error] = 'Could not find a site with this token.'
|
flash[:error] = 'Could not find a site with this token.'
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue