From fb491af8ec75db978d040102523f538e1c39f223 Mon Sep 17 00:00:00 2001 From: Mint <> Date: Fri, 9 Sep 2022 19:30:11 +0300 Subject: [PATCH] More sanitization --- fetch_blocks.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fetch_blocks.py b/fetch_blocks.py index efbed2f..7f1fedb 100644 --- a/fetch_blocks.py +++ b/fetch_blocks.py @@ -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 -- 2.39.5