Merge pull request #2210 from timnyborg/patch-5
prevent open redirects with no protocol specified
This commit is contained in:
+1
-1
@@ -1754,7 +1754,7 @@ class Auth(AuthAPI):
|
|||||||
# _next variable in the request.
|
# _next variable in the request.
|
||||||
if next:
|
if next:
|
||||||
parts = next.split('/')
|
parts = next.split('/')
|
||||||
if ':' not in parts[0]:
|
if ':' not in parts[0] and parts[:2] != ['', '']:
|
||||||
return next
|
return next
|
||||||
elif len(parts) > 2 and parts[0].endswith(':') and parts[1:3] == ['', host]:
|
elif len(parts) > 2 and parts[0].endswith(':') and parts[1:3] == ['', host]:
|
||||||
return next
|
return next
|
||||||
|
|||||||
Reference in New Issue
Block a user