4 ms·
Add a new bcrypted password column. Alter authentication so that it uses bcrypt column if populated. Alter registration/password changes so that it populates
by adrianhoward 14y ago
Add a new bcrypted password column.
Alter authentication so that it uses bcrypt column if populated.
Alter registration/password changes so that it populates bcrypt by default.
As old users log in (and you therefore have access to their plain text password and know that it's valid) populate the bcrypt with the correct hash.
After a period of N weeks when you've basically migrated all of your active users, do a forced password reset on the rest.
Kill the MD5 column.
Done :)
- yummyfajitas 14y agoAs I said: "I'd also replace the `bcrypt . md5` password with a regular bcrypt one after the user authenticates." The question is what to do to protect passwords starting today?
- adrianhoward 14y agoApologies. I'm an idiot who can't read a question :-) bcrypting the md5s sounds like a good approach.