From 34e97e4cf33b00e567ee66cf3517d0a7ba4dacb2 Mon Sep 17 00:00:00 2001 From: Solderpunk Date: Sun, 31 May 2020 14:23:30 +0200 Subject: [PATCH] Fix redirect logic. --- av98.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/av98.py b/av98.py index 1064e6a..5800392 100755 --- a/av98.py +++ b/av98.py @@ -427,8 +427,12 @@ Slow internet connection? Use 'set timeout' to be more patient.""") # Never follow cross-protocol redirects without asking elif new_gi.scheme != gi.scheme: follow = input("Follow cross-protocol redirect to %s? (y/n) " % new_gi.url) + # Don't follow *any* redirect without asking if auto-follow is off elif not self.options["auto_follow_redirects"]: follow = input("Follow redirect to %s? (y/n) " % new_gi.url) + # Otherwise, follow away + else: + follow == "yes" if follow.strip().lower() not in ("y", "yes"): return self._debug("Following redirect to %s." % new_gi.url)