From 96d5b05c84b94686c9196e33e6dd0278ecaae017 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', + }, +]