Fix #4641 -- Make usage of argon2id optional (#4643)

This commit is contained in:
Raphael Michel
2024-11-26 17:31:27 +01:00
committed by GitHub
parent 391eda25da
commit 7dd455ce15
3 changed files with 19 additions and 2 deletions

View File

@@ -726,7 +726,11 @@ PASSWORD_HASHERS = [
# the HistoricPassword model will not be changed automatically. In case a serious issue with a hasher
# comes to light, dropping the contents of the HistoricPassword table might be the more risk-adequate
# decision.
"django.contrib.auth.hashers.Argon2PasswordHasher",
*(
["django.contrib.auth.hashers.Argon2PasswordHasher"]
if config.getboolean('django', 'passwords_argon2', fallback=True)
else []
),
"django.contrib.auth.hashers.PBKDF2PasswordHasher",
"django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher",
"django.contrib.auth.hashers.BCryptSHA256PasswordHasher",