mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-23 07:56:44 -06:00
Open redirect fix after login
This is just to make sure after login you are just redirecting to a path not another domain.
This commit is contained in:
parent
90317adae7
commit
3f49225eff
@ -91,7 +91,7 @@ class LoginView(View):
|
||||
data = request.POST if request.method == "POST" else request.GET
|
||||
redirect_url = data.get('next', settings.LOGIN_REDIRECT_URL)
|
||||
|
||||
if redirect_url and redirect_url.startswith('/'):
|
||||
if redirect_url and redirect_url.startswith('/') and not redirect_url.startswith('//'):
|
||||
logger.debug(f"Redirecting user to {redirect_url}")
|
||||
else:
|
||||
if redirect_url:
|
||||
|
Loading…
Reference in New Issue
Block a user