flask-security icon indicating copy to clipboard operation
flask-security copied to clipboard

Doesn't support md5?

Open lishu2006ll opened this issue 6 years ago • 1 comments

I use md5_crypt ,but tell me: ValueError: Invalid password hashing scheme 'md5_crypt'. Allowed values are bcrypt, des_crypt, pbkdf2_sha256, pbkdf2_sha512, sha256_crypt, sha512_crypt and plaintext

who knows why?

lishu2006ll avatar Jul 02 '19 06:07 lishu2006ll

Yes - because the default list of SECURITY_PASSWORD_SCHEMES is: "PASSWORD_SCHEMES": [ "bcrypt", "des_crypt", "pbkdf2_sha256", "pbkdf2_sha512", "sha256_crypt", "sha512_crypt", # And always last one... "plaintext", ],

But of course - as stated here: https://passlib.readthedocs.io/en/stable/lib/passlib.hash.md5_crypt.html

dont' t use it. If you need to still honor OLD passwords encrypted with it - then simply add it to the list of PASSWORD_SCHEMES in your config.

jwag956 avatar Jul 03 '19 01:07 jwag956