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

Change the password hash from SHA1 to bcrypt #97

Open
valo opened this issue Jun 7, 2015 · 0 comments
Open

Change the password hash from SHA1 to bcrypt #97

valo opened this issue Jun 7, 2015 · 0 comments

Comments

@valo
Copy link
Owner

valo commented Jun 7, 2015

The user passwords are hashed using SHA1 at the moment, which is not secure. The passwords should be stored using bcrypt. Rails has API for this: http://api.rubyonrails.org/classes/ActiveModel/SecurePassword/ClassMethods.html#method-i-has_secure_password

We don't want to make all users reset their password, so we need to gradually migrate users to bcrypt. A possible solution will be to add a new column password_digest to User and populate it when the user logs in the next time. At this point we will be able to also clear out the password field of that user removing the unsafe SHA1 digest.

This way we will be able to gradually migrate users away from SHA1. After a while (1 year?) we can reset the passwords of all the users that haven't logged in and clear out all remaining SHA1 digests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant