]> git.mxchange.org Git - fba.git/commitdiff
More sanitization
authorMint <>
Fri, 9 Sep 2022 16:30:11 +0000 (19:30 +0300)
committerMint <>
Fri, 9 Sep 2022 16:30:11 +0000 (19:30 +0300)
fetch_blocks.py

index efbed2f7990630c519ca413e46611ee45f4b899f..7f1fedbf90359bb08ca47035319fca71bb5c7fda 100644 (file)
@@ -185,6 +185,8 @@ def tidyup(domain: str) -> str:
     domain = re.sub("\:\d+$", "", domain)
     # bigger retards put the schema in their blocklist, sometimes even without slashes
     domain = re.sub("^https?\:(\/*)", "", domain)
+    # and trailing slash
+    domain = re.sub("\/$", "", domain)
     # the biggest retards of them all try to block individual users
     domain = re.sub("(.+)\@", "", domain)
     return domain