diff options
author | Prabhu Ramachandran | 2017-05-25 17:42:42 +0530 |
---|---|---|
committer | GitHub | 2017-05-25 17:42:42 +0530 |
commit | 80b67d07ceaf4c73705a27ee0bfc905e30b19ac4 (patch) | |
tree | d828f6f7697438d8addf04140f6c32bd005aaf6f /yaksh/send_emails.py | |
parent | 7baaa70c0e7f660ad7482c3c3950eab171b27cd3 (diff) | |
parent | e6ab47d2ea99b703e3c261ad5e7b6785f6f8d5d5 (diff) | |
download | online_test-80b67d07ceaf4c73705a27ee0bfc905e30b19ac4.tar.gz online_test-80b67d07ceaf4c73705a27ee0bfc905e30b19ac4.tar.bz2 online_test-80b67d07ceaf4c73705a27ee0bfc905e30b19ac4.zip |
Merge pull request #296 from adityacp/fix_email_verfication_bug
Fix email verfication bug
Diffstat (limited to 'yaksh/send_emails.py')
-rw-r--r-- | yaksh/send_emails.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/yaksh/send_emails.py b/yaksh/send_emails.py index 8983024..24215dd 100644 --- a/yaksh/send_emails.py +++ b/yaksh/send_emails.py @@ -5,7 +5,6 @@ except ImportError: from string import ascii_letters as letters from string import digits, punctuation import hashlib -from random import randint from textwrap import dedent import smtplib @@ -18,7 +17,7 @@ from django.core.mail import send_mass_mail, send_mail def generate_activation_key(username): """ Generate hashed secret key for email activation """ chars = letters + digits + punctuation - secret_key = get_random_string(randint(10, 40), chars) + secret_key = get_random_string(20, chars) return hashlib.sha256((secret_key + username).encode('utf-8')).hexdigest() |