Skip to content

Commit

Permalink
Merge pull request #4735 from mirumee/defalut_password_validation
Browse files Browse the repository at this point in the history
Added validations for minimum password length in settings
  • Loading branch information
korycins committed Sep 17, 2019
2 parents c42b24f + de8fb22 commit 9e68873
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ All notable, unreleased changes to this project will be documented in this file.
- Filtering: use search in a consistent way. Add sort by product type name and publication status to products query. - #4715 by @fowczarek
- Migrated the old product attributes mapping to M2M - #4663 by @NyanKiyoshi
- Add translations to countries in shop query - #4732 by @fowczarek
- Added validations for minimum password length in settings - #4735 by @fowczarek

## 2.8.0

Expand Down
7 changes: 7 additions & 0 deletions saleor/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,13 @@ def get_bool_from_env(name, default_value):

LOGIN_URL = "/account/login/"

AUTH_PASSWORD_VALIDATORS = [
{
"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
"OPTIONS": {"min_length": 8},
}
]

DEFAULT_COUNTRY = os.environ.get("DEFAULT_COUNTRY", "US")
DEFAULT_CURRENCY = os.environ.get("DEFAULT_CURRENCY", "USD")
DEFAULT_DECIMAL_PLACES = get_currency_fraction(DEFAULT_CURRENCY)
Expand Down
2 changes: 2 additions & 0 deletions tests/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@

USE_JSON_CONTENT = False

AUTH_PASSWORD_VALIDATORS = []

PASSWORD_HASHERS = ["tests.dummy_password_hasher.DummyHasher"]
EXTENSIONS_MANAGER = "saleor.extensions.manager.ExtensionsManager"

Expand Down

0 comments on commit 9e68873

Please sign in to comment.