Commit 553fd6ac authored by Michal Čihař's avatar Michal Čihař

Create separate session for registration

This avoids problem with multiple registrations from single browser -
now every one will get separate session data not overwriting the partial
auth data from the previous ones.

Fixes rb#427
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 11a16fee
......@@ -420,7 +420,13 @@ def register(request):
if request.method == 'POST':
form = form_class(request.POST)
if form.is_valid() and appsettings.REGISTRATION_OPEN:
return complete(request, 'email')
# Ensure we do registration in separate session
# not sent to client
request.session.create()
result = complete(request, 'email')
request.session.save()
request.session = None
return result
else:
form = form_class()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment