From d7d0526f3d623367986b3cdfe8ba480fdd9f2fb2 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Fri, 2 Nov 2018 15:27:51 -0600 Subject: added support for pwned-passwords-django --- config/requirements.txt | 6 ++++++ config/settings.py | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/config/requirements.txt b/config/requirements.txt index d89255f..6edaadc 100644 --- a/config/requirements.txt +++ b/config/requirements.txt @@ -1,4 +1,6 @@ backcall==0.1.0 +certifi==2018.10.15 +chardet==3.0.4 confusable-homoglyphs==3.2.0 coverage==4.5.1 decorator==4.3.0 @@ -8,6 +10,7 @@ django-registration==3.0 django-storages==1.7.1 django-taggit==0.23.0 Faker==0.9.1 +idna==2.7 ipython==7.1.1 ipython-genutils==0.2.0 jedi==0.13.1 @@ -20,11 +23,14 @@ pkg-resources==0.0.0 prompt-toolkit==2.0.7 psycopg2==2.7.5 ptyprocess==0.6.0 +pwned-passwords-django==1.3.1 Pygments==2.2.0 python-dateutil==2.7.5 python-decouple==3.1 pytz==2018.7 +requests==2.20.0 six==1.11.0 text-unidecode==1.2 traitlets==4.3.2 +urllib3==1.24.1 wcwidth==0.1.7 diff --git a/config/settings.py b/config/settings.py index abe86dd..ef27950 100644 --- a/config/settings.py +++ b/config/settings.py @@ -100,6 +100,13 @@ DATABASES = { # https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'pwned_passwords_django.validators.PwnedPasswordsValidator', + 'OPTIONS': { + 'error_message': 'We hate to be the bearers of bad news, but that password is known to be compromised', + 'help_message': 'Your password can\'t be a commonly used password.', + } + }, { 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', }, -- cgit v1.2.3-70-g09d2