mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Stricten password validation to match PCI DSS requirements (#4467)
* Stricten password validation to match PCI DSS requirements * Review fix * Fix a file header
This commit is contained in:
@@ -714,6 +714,10 @@ BOOTSTRAP3 = {
|
||||
}
|
||||
|
||||
PASSWORD_HASHERS = [
|
||||
# Note that when updating this, all user passwords will be re-hashed on next login, however,
|
||||
# the HistoricPassword model will not be changed automatically. In case a serious issue with a hasher
|
||||
# comes to light, dropping the contents of the HistoricPassword table might be the more risk-adequate
|
||||
# decision.
|
||||
"django.contrib.auth.hashers.Argon2PasswordHasher",
|
||||
"django.contrib.auth.hashers.PBKDF2PasswordHasher",
|
||||
"django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher",
|
||||
@@ -725,7 +729,44 @@ AUTH_PASSWORD_VALIDATORS = [
|
||||
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
|
||||
"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
|
||||
"OPTIONS": {
|
||||
# To fulfill per PCI DSS requirement 8.3.6
|
||||
"min_length": 12,
|
||||
},
|
||||
},
|
||||
{
|
||||
# To fulfill per PCI DSS requirement 8.3.6
|
||||
'NAME': 'pretix.base.auth.NumericAndAlphabeticPasswordValidator',
|
||||
},
|
||||
{
|
||||
"NAME": "pretix.base.auth.HistoryPasswordValidator",
|
||||
"OPTIONS": {
|
||||
# To fulfill per PCI DSS requirement 8.3.7
|
||||
"history_length": 4,
|
||||
},
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
|
||||
},
|
||||
]
|
||||
CUSTOMER_AUTH_PASSWORD_VALIDATORS = [
|
||||
# For customer accounts, we apply a little less strict requirements to provide a risk-adequate
|
||||
# user experience.
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
||||
},
|
||||
{
|
||||
"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
|
||||
"OPTIONS": {
|
||||
"min_length": 8,
|
||||
},
|
||||
},
|
||||
{
|
||||
'NAME': 'pretix.base.auth.NumericAndAlphabeticPasswordValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
|
||||
|
||||
Reference in New Issue
Block a user