]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Tue, 11 Jul 2023 10:22:24 +0000 (12:22 +0200)
committerRoland Häder <roland@mxchange.org>
Tue, 11 Jul 2023 10:22:24 +0000 (12:22 +0200)
- strip off leading dots as the IDNA encoder gets confused about it

fba/commands.py

index 4d4f01f390bf335d6be7dc664941e06c53753a6f..12caa75ef01ded30fd793231ee898cde3bff0739 100644 (file)
@@ -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"]):