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

Don't send password reset instructions to unconfirmed email #288

Merged
merged 1 commit into from
Jul 3, 2015
Merged

Don't send password reset instructions to unconfirmed email #288

merged 1 commit into from
Jul 3, 2015

Conversation

coryschires
Copy link
Contributor

Background

Currently, we're overriding the Devise's send_reset_password_instructions to pass a few additional options.

Problem

As part of this, we're also overriding the recipient email address in order to conditionally send to the user's unconfirmed email. This is a (small) security liability. For more info see issue #287.

Solution

We still need to override send_reset_password_instructions, for good reason. But we don't need to override the to address. We can fix the issue by eliminating those specific lines. Tests pass!

Background
-------------------------------------------------------------------------------
Currently, we're overriding the Devise's `send_reset_password_instructions` to pass a few additional options.

Problem
-------------------------------------------------------------------------------
As part of this, we're also [overriding the recipient email address](https://github.com/lynndylanhurley/devise_token_auth/blob/master/app/models/devise_token_auth/concerns/user.rb#L79-L83) in order to conditionally send to the user's unconfirmed email. This is a (small) security liability. For more info see issue #287.

Solution
-------------------------------------------------------------------------------
We still need to override `send_reset_password_instructions`, for good reason. But we don't need to override the `to` address. We can fix the issue by eliminating those specific lines.
booleanbetrayal added a commit that referenced this pull request Jul 3, 2015
…tructions-to-unconfirmed-email

Don't send password reset instructions to unconfirmed email
@booleanbetrayal booleanbetrayal merged commit c826160 into lynndylanhurley:master Jul 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants