mirror of https://github.com/zulip/zulip.git
registration: Incorporate redirect URL building helper function.
This commit adds 'add_query_to_redirect_url' to one additional function which had not yet been written when 'add_query_to_redirect_url' was introduced. This helper centralizes URL manipulation for redirects, making it easier to add Pysa sanitization in subsequent commits.
This commit is contained in:
parent
ca4357fd64
commit
56345f98cb
|
@ -444,7 +444,7 @@ def send_confirm_registration_email(email: str, activation_url: str, language: s
|
||||||
def redirect_to_email_login_url(email: str) -> HttpResponseRedirect:
|
def redirect_to_email_login_url(email: str) -> HttpResponseRedirect:
|
||||||
login_url = reverse('django.contrib.auth.views.login')
|
login_url = reverse('django.contrib.auth.views.login')
|
||||||
email = urllib.parse.quote_plus(email)
|
email = urllib.parse.quote_plus(email)
|
||||||
redirect_url = login_url + '?already_registered=' + email
|
redirect_url = add_query_to_redirect_url(login_url, 'already_registered=' + email)
|
||||||
return HttpResponseRedirect(redirect_url)
|
return HttpResponseRedirect(redirect_url)
|
||||||
|
|
||||||
def create_realm(request: HttpRequest, creation_key: Optional[str]=None) -> HttpResponse:
|
def create_realm(request: HttpRequest, creation_key: Optional[str]=None) -> HttpResponse:
|
||||||
|
|
Loading…
Reference in New Issue