email_activation: fix hash
authorYasin <mohammed-yasin.rahman@lip6.fr>
Wed, 4 Jun 2014 15:22:43 +0000 (17:22 +0200)
committerYasin <mohammed-yasin.rahman@lip6.fr>
Wed, 4 Jun 2014 15:22:43 +0000 (17:22 +0200)
portal/registrationview.py

index 6c626be..04a0d10 100644 (file)
@@ -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',      ''),