From 0e99c42728707aa162be96a58665b8d71cf22438 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 15 Aug 2023 21:21:09 +0200 Subject: [PATCH] Continued: - fixed instance (host) names with two dots causing a UnicodeError --- fba/http/federation.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fba/http/federation.py b/fba/http/federation.py index af00643..c5b4cf7 100644 --- a/fba/http/federation.py +++ b/fba/http/federation.py @@ -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") -- 2.39.5