From: Yasin Date: Wed, 4 Jun 2014 15:22:43 +0000 (+0200) Subject: email_activation: fix hash X-Git-Tag: myslice-1.1~86 X-Git-Url: http://git.onelab.eu/?p=unfold.git;a=commitdiff_plain;h=d2eac375f1b2bb582c6038108035f5b7d75fca9f email_activation: fix hash --- diff --git a/portal/registrationview.py b/portal/registrationview.py index 6c626be1..04a0d10e 100644 --- a/portal/registrationview.py +++ b/portal/registrationview.py @@ -57,7 +57,9 @@ class RegistrationView (FreeAccessView, ThemeView): current_site = current_site.domain post_email = wsgi_request.POST.get('email','').lower() - email_hash = md5(post_email).digest().encode('base64')[:-1] + salt = randint(1,100000) + email_hash = md5(str(salt)+post_email).hexdigest() + #email_hash = md5(post_email).digest().encode('base64')[:-1] user_request = { 'first_name' : wsgi_request.POST.get('firstname', ''), 'last_name' : wsgi_request.POST.get('lastname', ''),