Skip to content

Commit

Permalink
make sha1 explicit default for password hashing
Browse files Browse the repository at this point in the history
only takes effect on django 1.5 as this django setting was only added in 1.4
  • Loading branch information
dannyroberts committed Jan 14, 2014
1 parent 05d34f4 commit afa8f60
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,17 @@

SESSION_ENGINE = "django.contrib.sessions.backends.cached_db"

PASSWORD_HASHERS = (
# this is the default list with SHA1 moved to the front
'django.contrib.auth.hashers.SHA1PasswordHasher',
'django.contrib.auth.hashers.PBKDF2PasswordHasher',
'django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher',
'django.contrib.auth.hashers.BCryptPasswordHasher',
'django.contrib.auth.hashers.MD5PasswordHasher',
'django.contrib.auth.hashers.UnsaltedMD5PasswordHasher',
'django.contrib.auth.hashers.CryptPasswordHasher',
)

ROOT_URLCONF = "urls"

TEMPLATE_CONTEXT_PROCESSORS = [
Expand Down

0 comments on commit afa8f60

Please sign in to comment.