diff --git a/src/farmtech/views/auth.py b/src/farmtech/views/auth.py index 1a6c1bb..c0c6562 100644 --- a/src/farmtech/views/auth.py +++ b/src/farmtech/views/auth.py @@ -312,7 +312,8 @@ def get(self, request): logout(request) next_url = request.GET.get("next", "/") - if not url_has_allowed_host_and_scheme(next_url, allowed_hosts=None): + allowed_hosts = {request.get_host()} + if not url_has_allowed_host_and_scheme(next_url, allowed_hosts=allowed_hosts): next_url = "/" return redirect(next_url)