Merge "Address RemovedInDjango40Warning"
This commit is contained in:
commit
fcf3ae9365
@ -447,8 +447,9 @@ def switch_system_scope(request, redirect_field_name=auth.REDIRECT_FIELD_NAME):
|
||||
# Ensure the user-originating redirection url is safe.
|
||||
# Taken from django.contrib.auth.views.login()
|
||||
redirect_to = request.GET.get(redirect_field_name, '')
|
||||
if not http.is_safe_url(url=redirect_to,
|
||||
allowed_hosts=[request.get_host()]):
|
||||
if (not http.url_has_allowed_host_and_scheme(
|
||||
url=redirect_to,
|
||||
allowed_hosts=[request.get_host()])):
|
||||
redirect_to = settings.LOGIN_REDIRECT_URL
|
||||
|
||||
if auth_ref:
|
||||
|
Loading…
Reference in New Issue
Block a user