From 6c6f7600a800fc622cdffddf8cfc8e291bcf6c0c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 11 Jul 2023 12:22:24 +0200 Subject: [PATCH] Continued: - strip off leading dots as the IDNA encoder gets confused about it --- fba/commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fba/commands.py b/fba/commands.py index 4d4f01f..12caa75 100644 --- a/fba/commands.py +++ b/fba/commands.py @@ -402,7 +402,7 @@ def fetch_blocks(args: argparse.Namespace) -> int: continue logger.debug("block[blocked]='%s' - BEFORE!", block["blocked"]) - block["blocked"] = block["blocked"].encode("idna").decode("utf-8") + block["blocked"] = block["blocked"].lstrip(".").encode("idna").decode("utf-8") logger.debug("block[blocked]='%s' - AFTER!", block["blocked"]) if not utils.is_domain_wanted(block["blocked"]): -- 2.39.5