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

Plaintext tokens #589

Open
jjb opened this issue Aug 20, 2015 · 1 comment
Open

Plaintext tokens #589

jjb opened this issue Aug 20, 2015 · 1 comment

Comments

@jjb
Copy link
Contributor

jjb commented Aug 20, 2015

In Feb 2014 I brought up the idea of plaintext tokens: #444

As of devise 3.5.2, devise no longer uses them for email confirmation (oddly categorized as a bug fix)

Could devise_invitable now consider changing accordingly?

The reason they rationalized being able to do it is because they no longer log users in after confirming (in case the system uses 2-factor). I think maybe devise invitable doesn't have to worry about that, since the user is always brand new?

@scambra
Copy link
Owner

scambra commented Oct 15, 2015

I have been thinking in this and not sure if it's safe. If raw token is stored, getting access to DB can allow to get access to an account, it would be a new account, but an accounting binded to an email, so it's similar to reasons to store encrypted token for remember password. In a social media web, for example, attacker could contact with inviter, and inviter would think it's talking with a friend, so attacker would be forging identity.

Maybe a config option could be added, default to encrypted which is safest.

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

No branches or pull requests

2 participants