Don't follow cross-domain redirects automatically.
This commit is contained in:
parent
7a3f1c77a5
commit
8945fa4f7e
5
av98.py
5
av98.py
|
@ -413,6 +413,11 @@ Slow internet connection? Use 'set timeout' to be more patient.""")
|
|||
print("Error: caught in redirect loop!")
|
||||
elif len(self.previous_redirectors) == _MAX_REDIRECTS:
|
||||
print("Error: refusing to follow more than %d consecutive redirects!" % _MAX_REDIRECTS)
|
||||
# Never follow cross-domain redirects without asking
|
||||
elif new_gi.host != gi.host:
|
||||
follow = input("Follow cross-domain redirect to %s? (y/n) " % new_gi.url)
|
||||
if follow.strip().lower() not in ("y", "yes"):
|
||||
return
|
||||
elif not self.options["auto_follow_redirects"]:
|
||||
follow = input("Follow redirect to %s? (y/n) " % new_gi.url)
|
||||
if follow.strip().lower() not in ("y", "yes"):
|
||||
|
|
Loading…
Reference in New Issue