Skip to content

Commit

Permalink
upgrade to argon password hasher
Browse files Browse the repository at this point in the history
Fixes #3362
  • Loading branch information
sinwar committed Feb 3, 2017
1 parent b4b6516 commit 3f232d1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions requirements/common.txt
Expand Up @@ -175,3 +175,6 @@ pycodestyle==2.1.0
# Needed for link preview
beautifulsoup4==4.5.1
git+https://github.com/rafaelmartins/pyoembed.git@eb9901917c2a44b49e2887c077ead84a722c50dc#egg=pyoembed

# Needed for password hashing
argon2-cffi==16.3.0
5 changes: 5 additions & 0 deletions zproject/settings.py
Expand Up @@ -496,6 +496,11 @@ def get_secret(key):
# can query using ./manage.py print_initial_password
INITIAL_PASSWORD_SALT = get_secret("initial_password_salt")

# Use best password hashing algorithm argon2 for PRODUCTION
if PRODUCTION:
PASSWORD_HASHERS = ('django.contrib.auth.hashers.Argon2PasswordHasher',
'django.contrib.auth.hashers.PBKDF2PasswordHasher')

########################################################################
# API/BOT SETTINGS
########################################################################
Expand Down

0 comments on commit 3f232d1

Please sign in to comment.