Skip to content

Commit 2fa1989

Browse files
authored
Enable auth validate passwords (#5696)
Enable auth validate passwords
2 parents 0bac470 + 17cd8a2 commit 2fa1989

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

readthedocs/settings/base.py

+18
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,24 @@ def USE_PROMOS(self): # noqa
181181
'allauth.account.auth_backends.AuthenticationBackend',
182182
)
183183

184+
AUTH_PASSWORD_VALIDATORS = [
185+
{
186+
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
187+
},
188+
{
189+
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
190+
'OPTIONS': {
191+
'min_length': 9,
192+
}
193+
},
194+
{
195+
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
196+
},
197+
{
198+
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
199+
},
200+
]
201+
184202
MESSAGE_STORAGE = 'readthedocs.notifications.storages.FallbackUniqueStorage'
185203

186204
NOTIFICATION_BACKENDS = [

readthedocs/settings/dev.py

+3
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ def DATABASES(self): # noqa
5151
# Disable auto syncing elasticsearch documents in development
5252
ELASTICSEARCH_DSL_AUTOSYNC = False
5353

54+
# Disable password validators on development
55+
AUTH_PASSWORD_VALIDATORS = []
56+
5457
@property
5558
def LOGGING(self): # noqa - avoid pep8 N802
5659
logging = super().LOGGING

0 commit comments

Comments
 (0)