Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use argon2 password hasher by default #294

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion project_name/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
# If using Celery, tell it to obey our logging configuration.
CELERYD_HIJACK_ROOT_LOGGER = False

# https://docs.djangoproject.com/en/1.9/topics/auth/passwords/#password-validation
# https://docs.djangoproject.com/en/{{ docs_version }}/topics/auth/passwords/#password-validation
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
Expand All @@ -205,3 +205,12 @@
SECURE_BROWSER_XSS_FILTER = True
CSRF_COOKIE_HTTPONLY = True
X_FRAME_OPTIONS = 'DENY'

# Use the argon2 password hasher (but maintain compatibility with older hashers). See:
# https://docs.djangoproject.com/en/{{ docs_version }}/topics/auth/passwords/#using-argon2-with-django
PASSWORD_HASHERS = [
'django.contrib.auth.hashers.Argon2PasswordHasher',
'django.contrib.auth.hashers.PBKDF2PasswordHasher',
'django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher',
'django.contrib.auth.hashers.BCryptSHA256PasswordHasher',
]
4 changes: 2 additions & 2 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ psycopg2==2.7.4
Pillow==5.0.0
# The comment on the next line tells requests.io to warn us if there's a newer
# version of Django within the given range, but not for versions outside that
# range. So if 1.11.12 gets released, we get warned. If 2.0.1 gets released,
# range. So if 1.11.21 gets released, we get warned. If 2.0.1 gets released,
# we don't.
Django==1.11.11 # rq.filter: >=1.11.11,<2.0
Django[argon2]==1.11.20 # rq.filter: >=1.11.20,<2.0
six==1.11.0

BeautifulSoup4==4.6.0
Expand Down
2 changes: 1 addition & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pep8==1.7.1
mccabe==0.6.1

# For translation
transifex-client==0.13.1
transifex-client==0.13.6

requires.io

Expand Down