summaryrefslogtreecommitdiff
path: root/config.py
diff options
context:
space:
mode:
authorDonald Stufft <donald@stufft.io>2013-02-12 03:36:06 -0500
committerDonald Stufft <donald@stufft.io>2013-02-12 03:36:06 -0500
commit41362f694af6851b1f3428ba38ebc495e60cad73 (patch)
treec10119bd7343ff498df9996420c009ade99464de /config.py
parent622d5b0defc2c08e58a5544c0423cc7d98538cf3 (diff)
downloaddecorator-41362f694af6851b1f3428ba38ebc495e60cad73.tar.gz
Include a migration path for moving legacy users to a stronger hash
* Includes a method for hashing the sha1 passwords with bcrypt to increase their security * bcrypt_sha1 will upgrade to standard bcrypt as per usual with passlib * Provides a script that migrates 20 users at a time to bcrypt_sha1 Migration script was modified from one written by Giovanni Bajo
Diffstat (limited to 'config.py')
-rw-r--r--config.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/config.py b/config.py
index d8489f1..324600e 100644
--- a/config.py
+++ b/config.py
@@ -2,6 +2,11 @@ import ConfigParser
from urlparse import urlsplit, urlunsplit
from passlib.context import CryptContext
+from passlib.registry import register_crypt_handler_path
+
+
+# Register our legacy password handler
+register_crypt_handler_path("bcrypt_sha1", "legacy_passwords")
class Config: