aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/views.py
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2014-11-19 21:36:45 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2014-11-19 21:36:45 +0100
commite805a4eeab96d01fc24b7215bdef8c63a77e8934 (patch)
tree4e57d1ff887ff32cfdd0e29f1a3fa60e0dcec450 /pyaggr3g470r/views.py
parentEmails via Postmark and traditional SMTP server. (diff)
downloadnewspipe-e805a4eeab96d01fc24b7215bdef8c63a77e8934.tar.gz
newspipe-e805a4eeab96d01fc24b7215bdef8c63a77e8934.tar.bz2
newspipe-e805a4eeab96d01fc24b7215bdef8c63a77e8934.zip
Bug fix: activation key was too long for the database column.
Diffstat (limited to 'pyaggr3g470r/views.py')
-rw-r--r--pyaggr3g470r/views.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py
index 712f1da3..9a2b2811 100644
--- a/pyaggr3g470r/views.py
+++ b/pyaggr3g470r/views.py
@@ -912,7 +912,7 @@ def disable_user(user_id=None):
else:
import random, hashlib
- user.activation_key = hashlib.sha512(str(random.getrandbits(256)).encode("utf-8")).hexdigest()
+ user.activation_key = hashlib.sha512(str(random.getrandbits(256)).encode("utf-8")).hexdigest()[:86]
flash(gettext('Account of the user') + ' ' + user.nickname + ' ' + gettext('successfully disabled.'), 'success')
db.session.commit()
else:
bgstack15