Prevent CSRF bypass with password reset form
This commit is contained in:
parent
c49e400aa3
commit
51af102c00
2 changed files with 11 additions and 1 deletions
|
@ -151,7 +151,7 @@ class UsersController < ApplicationController
|
|||
def lost_password
|
||||
@title = t "users.lost_password.title"
|
||||
|
||||
if params[:email]
|
||||
if request.post?
|
||||
user = User.visible.find_by(:email => params[:email])
|
||||
|
||||
if user.nil?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue