avoid phishing

This commit is contained in:
simon lehericey 2021-12-15 13:44:12 +01:00
parent 0e7a6f5acf
commit c7f7855f14
2 changed files with 23 additions and 1 deletions

View file

@ -19,7 +19,11 @@ class Users::SessionsController < Devise::SessionsController
end
def link_sent
@email = params[:email]
if Devise.email_regexp.match?(params[:email])
@email = params[:email]
else
redirect_to root_path
end
end
# DELETE /resource/sign_out