From: Michael Tremer Date: Sun, 28 Dec 2025 13:35:04 +0000 (+0000) Subject: sources: Remove any trailing dots from domains X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee457b3eeea335f50a14d9cb4c3cb95a6c0929e7;p=dbl.git sources: Remove any trailing dots from domains Signed-off-by: Michael Tremer --- diff --git a/src/dnsbl/sources.py b/src/dnsbl/sources.py index 81bf340..236a542 100644 --- a/src/dnsbl/sources.py +++ b/src/dnsbl/sources.py @@ -233,6 +233,9 @@ class Source(sqlmodel.SQLModel, database.BackendMixin, table=True): # Remove any leading "*." domain = domain.removeprefix("*.") + # Remove any trailing dots + domain = domain.removesuffix(".") + # Skip any invalid domain names if not util.is_fqdn(domain): # Silently skip any IP addresses