aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo Chatzimichos <tampakrap@gentoo.org>2011-07-21 20:10:33 +0300
committerTheo Chatzimichos <tampakrap@gentoo.org>2011-07-21 20:10:33 +0300
commitd60c7e9471c442112d66a9b15838bd22fdd76600 (patch)
tree52d434de624085f996397b060e19966b494c21df
parentImprove gitignore to ignore the custom made settings files (diff)
downloadidentity.gentoo.org-d60c7e9471c442112d66a9b15838bd22fdd76600.tar.gz
identity.gentoo.org-d60c7e9471c442112d66a9b15838bd22fdd76600.tar.bz2
identity.gentoo.org-d60c7e9471c442112d66a9b15838bd22fdd76600.zip
Exclude the salt from the returned decrypted password
-rw-r--r--libraries/encryption.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/libraries/encryption.py b/libraries/encryption.py
index 3650844..90b7fcf 100644
--- a/libraries/encryption.py
+++ b/libraries/encryption.py
@@ -29,7 +29,7 @@ def encrypt_password(password):
def decrypt_password(password):
obj = Blowfish.new(settings.BLOWFISH_KEY)
original_password = obj.decrypt(base64.b64decode(password + settings.SECRET_KEY[:8]))
- return original_password
+ return original_password[:-8]
def random_string(length, type = None):
if type == 'password':