Reputation: 95
My reset password token is leaking to google analytics when user click on link in email to reset token. http://localhost:5000/users/password/edit?reset_password_token=g1xMHpjsDEE3MkMFUapo
After inspect I can see
Tryed following link but no use, Please help.
https://thoughtbot.com/blog/is-your-site-leaking-password-reset-links
https://github.com/thoughtbot/clearance/pull/707
https://github.com/thoughtbot/clearance/pull/706
my passwords_controller.rb
def create self.resource = resource_class.send_reset_password_instructions(resource_params) yield resource if block_given?
if successfully_sent?(resource)
respond_with({}, location: after_sending_reset_password_instructions_path_for(resource_name))
else
respond_with(resource)
end
end
def edit self.resource = resource_class.new resource.reset_password_token = params[:reset_password_token] end
Upvotes: 3
Views: 685
Reputation: 584
You can just take away the Google Analytics script from that specific page.
I assume that you import the script in the application layout file, so you have two options:
If you do one of the two, it should stop "leaking".
Upvotes: 1