mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
django: Use Argon2 password hash
Passwords will be automatically upgraded for each user on login. Usernames not yet upgraded are vulnerable to user enumeration attack due to difference in password check timing. No need to add build dependency on python3-argon2 because tests use a different Django configuration which does not use argon2 hash. Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
039461b846
commit
1faee11d4d
1
debian/control
vendored
1
debian/control
vendored
@ -79,6 +79,7 @@ Depends:
|
||||
ppp,
|
||||
pppoe,
|
||||
python3-apt,
|
||||
python3-argon2,
|
||||
python3-augeas,
|
||||
python3-bootstrapform,
|
||||
python3-cherrypy3,
|
||||
|
||||
@ -135,6 +135,12 @@ def init():
|
||||
'plinth.modules.first_boot.middleware.FirstBootMiddleware',
|
||||
'plinth.middleware.SetupMiddleware',
|
||||
),
|
||||
PASSWORD_HASHERS=[
|
||||
'django.contrib.auth.hashers.Argon2PasswordHasher',
|
||||
'django.contrib.auth.hashers.PBKDF2PasswordHasher',
|
||||
'django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher',
|
||||
'django.contrib.auth.hashers.BCryptSHA256PasswordHasher',
|
||||
],
|
||||
ROOT_URLCONF='plinth.urls',
|
||||
SECURE_BROWSER_XSS_FILTER=True,
|
||||
SECURE_CONTENT_TYPE_NOSNIFF=True,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user