Commits

Anonymous committed 830c963

Tweak activation URL to only match on a valid hash

  • Participants
  • Parent commits 6f50457

Comments (0)

Files changed (2)

 from views import activate, register
 
 urlpatterns = patterns('',
-                       (r'^activate/(?P<activation_key>\w+)/$', activate),
+                       (r'^activate/(?P<activation_key>[a-fA-f0-9]+)/$', activate),
                        (r'^login/$', login, {'template_name': 'registration/login.html'}),
                        (r'^logout/$', logout, {'template_name': 'registration/logout.html'}),
                        (r'^register/$', register),
         registration/activate.html
     
     """
+    activation_key = activation_key.lower()
     account = RegistrationProfile.objects.activate_user(activation_key)
     return render_to_response('registration/activate.html',
                               {'account': account,