From: Michael Tremer Date: Fri, 2 Jan 2026 14:22:28 +0000 (+0000) Subject: sources: Accept "[Adblock Plus 2.0]" as a valid header X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4d04b3b018c2ad8fa974de75b6af04d5f86c95e;p=dbl.git sources: Accept "[Adblock Plus 2.0]" as a valid header Signed-off-by: Michael Tremer --- diff --git a/src/dnsbl/sources.py b/src/dnsbl/sources.py index dbf5a46..df1384f 100644 --- a/src/dnsbl/sources.py +++ b/src/dnsbl/sources.py @@ -391,7 +391,11 @@ class Source(sqlmodel.SQLModel, database.BackendMixin, table=True): Called very early when we are detecting the format """ # Check for the Adblock Plus header - if line == "[Adblock Plus]" or line.startswith("!") or line.startswith("||"): + if line in ("[Adblock Plus]", "[Adblock Plus 2.0]"): + return Format.ADBLOCKPLUS + + # Sometimes we don't have a header, but we will see comments or the first domain + elif line.startswith("!") or line.startswith("||"): return Format.ADBLOCKPLUS # Is this a hosts file?