BCryptMigrationFromSHA1: Make sure we save the password after encrypting it to Bcrypt #237

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@edouard

The BCryptMigrationFromSHA1 password strategy wasn’t saving the generated Bcypt password to database, so SHA-1 users were never migrated to Bcrypt.

In this pull request, we call save on the User model in authenticated_with_sha1? right after assigning the Bcrypt-encrypted password to encrypted_password.

See also issue #236 where I described the issue.

@croaky
thoughtbot, inc. member

@edouard Thanks. Merged as f529a1a.

@croaky croaky closed this Feb 13, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment