From 1b2e7d1fb4f3de2c3ed72722db88f0dfb9bb3238 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 13 Jun 2023 11:32:02 +0200 Subject: [PATCH] Continued: - domain/path might be a valid installation path, but some bug in Friendica caused my instance to be reported as 'f.haeder.net/featured' which sucks - still we need to let domain/path pass here as some installations might be happening to be installed in such a way - sure, best option is always a sub-domain ... --- fba/federation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fba/federation.py b/fba/federation.py index 941b192..88e6236 100644 --- a/fba/federation.py +++ b/fba/federation.py @@ -69,7 +69,7 @@ def fetch_instances(domain: str, origin: str, software: str, command: str, path: elif domain.endswith(".arpa"): print(f"WARNING: domain='{domain}' is a reversed .arpa domain and should not be used generally.") return - elif not validators.domain(domain): + elif not validators.domain(domain.split("/")[0]): raise ValueError(f"domain='{domain}' is not a valid domain") elif not instances.is_registered(domain.split("/")[0]): # DEBUG: print("DEBUG: Adding new domain:", domain, origin) -- 2.39.5