mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 07:23:22 +00:00
Use .cleaned_data rather than sanitising identifiers twice.
(imported from commit c691e010f94e623706167a91ccfd505fae02f609)
This commit is contained in:
@@ -58,11 +58,11 @@ def register(request):
|
|||||||
|
|
||||||
form = RegistrationForm(request.POST)
|
form = RegistrationForm(request.POST)
|
||||||
if form.is_valid():
|
if form.is_valid():
|
||||||
password = request.POST['password']
|
password = strip_html(form.cleaned_data['password'])
|
||||||
full_name = strip_html(request.POST['full_name'])
|
full_name = strip_html(form.cleaned_data['full_name'])
|
||||||
short_name = strip_html(request.POST['short_name'])
|
short_name = strip_html(email.split('@')[0])
|
||||||
email = strip_html(request.POST['email'])
|
email = strip_html(form.cleaned_data['email'])
|
||||||
domain = strip_html(request.POST['domain'])
|
domain = strip_html(form.cleaned_data['domain'])
|
||||||
realm = Realm.objects.filter(domain=domain)
|
realm = Realm.objects.filter(domain=domain)
|
||||||
if not realm:
|
if not realm:
|
||||||
realm = Realm(domain=domain)
|
realm = Realm(domain=domain)
|
||||||
|
|||||||
Reference in New Issue
Block a user