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.
|
||||
if next:
|
||||
parts = next.split('/')
|
||||
if ':' not in parts[0]:
|
||||
if ':' not in parts[0] and parts[:2] != ['', '']:
|
||||
return next
|
||||
elif len(parts) > 2 and parts[0].endswith(':') and parts[1:3] == ['', host]:
|
||||
return next
|
||||
|
||||
Reference in New Issue
Block a user