mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-04-15 09:51:21 +00:00
password: add Django password validators
Added all default Django password validators. Not enforcing special characters. https://blog.codinghorror.com/password-rules-are-bullshit/ Signed-off-by: Joseph Nuthalpati <njoseph@thoughtworks.com> Reviewed-by: Johannes Keyser <johanneskeyser@posteo.de>
This commit is contained in:
parent
fbe08443f4
commit
2e73d442e9
@ -218,6 +218,23 @@ def configure_django():
|
||||
|
||||
django.conf.settings.configure(
|
||||
ALLOWED_HOSTS=['*'],
|
||||
AUTH_PASSWORD_VALIDATORS = [
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
|
||||
'OPTIONS': {
|
||||
'min_length': 8,
|
||||
}
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
|
||||
},
|
||||
],
|
||||
CACHES={'default':
|
||||
{'BACKEND': 'django.core.cache.backends.dummy.DummyCache'}},
|
||||
DATABASES={'default':
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user