X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=portal%2Fregistrationview.py;h=f7314473c1e3eabd883e74dfc97c5865e4b9febe;hb=7b8e398d8ecb65b1a860e8651f3d2bf5bbace539;hp=5956f3d655ee18b7c15ab86fb120240e87a7f7d0;hpb=d04f3fd85686bee03a961494bdb4a68d6fb07ad4;p=unfold.git diff --git a/portal/registrationview.py b/portal/registrationview.py index 5956f3d6..f7314473 100644 --- a/portal/registrationview.py +++ b/portal/registrationview.py @@ -47,7 +47,7 @@ class RegistrationView (FreeAccessView, ThemeView): page = Page(wsgi_request) page.add_js_files ( [ "js/jquery.validate.js", "js/my_account.register.js" ] ) page.add_css_files ( [ "css/onelab.css", "css/registration.css" ] ) - page.add_css_files ( [ "http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" ] ) + page.add_css_files ( [ "https://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" ] ) if method == 'POST': # The form has been submitted @@ -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', ''), @@ -66,7 +68,7 @@ class RegistrationView (FreeAccessView, ThemeView): 'password' : wsgi_request.POST.get('password', ''), 'current_site' : current_site, 'email_hash' : email_hash, - 'validation_link': 'http://' + current_site + '/portal/email_activation/'+ email_hash + 'validation_link': 'https://' + current_site + '/portal/email_activation/'+ email_hash } # Construct user_hrn from email (XXX Should use common code)