Question

If I update PASSWORD_HASHERS in Django settings, will Django automatically update the passwords of users that were hashed with a previous algorithm when they sign in?

I'm working with a table of users and passwords where some has been hashed with sha1 or md5 and some with bcrypt. I want to make sure that as users sign in, their passwords are updated with bcrypt so that I can progressively become more secure.

Was it helpful?

Solution

Yes, "When users log in, if their passwords are stored with anything other than the preferred algorithm, Django will automatically upgrade the algorithm to the preferred one." Relevant docs.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top