]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Tue, 15 Aug 2023 19:21:09 +0000 (21:21 +0200)
committerRoland Häder <roland@mxchange.org>
Tue, 15 Aug 2023 19:21:09 +0000 (21:21 +0200)
- fixed instance (host) names with two dots causing a UnicodeError

fba/http/federation.py

index af0064342fdfdce37b604682ff31c3e0f4bf6af8..c5b4cf72ab17653c3ab7b7bcc1c8aa6230e6e939 100644 (file)
@@ -128,6 +128,9 @@ def fetch_instances(domain: str, origin: str, software: str, command: str, path:
         if instance == "":
             logger.warning("Empty instance after tidyup.domain(), domain='%s'", domain)
             continue
+        elif ".." in instance:
+            logger.warning("instance='%s' contains double-dot, removing ...", instance)
+            instance = instance.replace("..", ".")
 
         logger.debug("instance='%s' - BEFORE!", instance)
         instance = instance.encode("idna").decode("utf-8")