From 9ded919a2ff65839152ff3d73f1efc53126bb3f0 Mon Sep 17 00:00:00 2001 From: lian Date: Thu, 30 Sep 2021 14:41:02 +0800 Subject: [PATCH] use allowed_hosts argument for is_safe_url func --- seahub/auth/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seahub/auth/views.py b/seahub/auth/views.py index d946b60be6..e2cd724edf 100644 --- a/seahub/auth/views.py +++ b/seahub/auth/views.py @@ -234,7 +234,7 @@ def login_simple_check(request): # Ensure the user-originating redirection url is safe. if REDIRECT_FIELD_NAME in request.GET: next_page = request.GET[REDIRECT_FIELD_NAME] - if not is_safe_url(url=next_page, host=request.get_host()): + if not is_safe_url(url=next_page, allowed_hosts=request.get_host()): next_page = settings.LOGIN_REDIRECT_URL else: next_page = settings.SITE_ROOT