mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-19 18:29:23 +00:00
use allowed_hosts argument for is_safe_url func
This commit is contained in:
@@ -234,7 +234,7 @@ def login_simple_check(request):
|
|||||||
# Ensure the user-originating redirection url is safe.
|
# Ensure the user-originating redirection url is safe.
|
||||||
if REDIRECT_FIELD_NAME in request.GET:
|
if REDIRECT_FIELD_NAME in request.GET:
|
||||||
next_page = request.GET[REDIRECT_FIELD_NAME]
|
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
|
next_page = settings.LOGIN_REDIRECT_URL
|
||||||
else:
|
else:
|
||||||
next_page = settings.SITE_ROOT
|
next_page = settings.SITE_ROOT
|
||||||
|
Reference in New Issue
Block a user