From c19723375bdf9c0a452430164ddf97f7168a00d0 Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Sun, 19 Apr 2020 22:20:13 +0200 Subject: [PATCH] Enforce password policy example file --- re2o/settings_local.example.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/re2o/settings_local.example.py b/re2o/settings_local.example.py index 7130a1f2..18c80559 100644 --- a/re2o/settings_local.example.py +++ b/re2o/settings_local.example.py @@ -108,4 +108,20 @@ OPTIONNAL_APPS_RE2O = () OPTIONNAL_APPS = OPTIONNAL_APPS_RE2O + () #Set auth password validator -AUTH_PASSWORD_VALIDATORS = [] +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', + }, +]