Enable auth validate passwords
Define some simple validators to use when creating a new user or
changing the password.
@@ -181,6 +181,24 @@ class CommunityBaseSettings(Settings):
'allauth.account.auth_backends.AuthenticationBackend',
)
+ AUTH_PASSWORD_VALIDATORS = [
+ {
+ 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
+ },
+ {
+ 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
+ 'OPTIONS': {
+ 'min_length': 9,
+ }
+ },
+ {
+ 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
+ },
+ {
+ 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
+ },
+ ]
+
MESSAGE_STORAGE = 'readthedocs.notifications.storages.FallbackUniqueStorage'
NOTIFICATION_BACKENDS = [
