Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset password allows user to bypass custom find_for_authentication #4304

Closed
toots opened this issue Sep 20, 2016 · 2 comments
Closed

Reset password allows user to bypass custom find_for_authentication #4304

toots opened this issue Sep 20, 2016 · 2 comments

Comments

@toots
Copy link

toots commented Sep 20, 2016

As documented in lib/devise/models/authenticatable.rb,

        # Finally, notice that Devise also queries for users in other scenarios
        # besides authentication, for example when retrieving an user to send
        # an e-mail for password reset. In such cases, find_for_authentication
        # is not called.

However, that makes it possible for a user to actually bypass custom find_for_authentication and successfully sign-in when it would have been explicitly prohibited otherwise.

Most common scenario is a website allowing subdomain-based authentication, leading users for domain foo.example.com to be able to sign-in into bla.example.com by reseting their password on bla.example.com.

@tegon
Copy link
Member

tegon commented Dec 23, 2017

Hello @toots, thanks for your report.
Can you provide us a sample application that reproduces the issue in isolation?
That would help us find the issue.

Thank you!

@tegon
Copy link
Member

tegon commented Mar 19, 2018

I'm closing this issue because it has not had recent activity.
If you're still facing this on the latest version, please open a new one with all the information requested in the template.

Thank you!

@tegon tegon closed this as completed Mar 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants