]> git.ipfire.org Git - dbl.git/commitdiff
sources: Don't rely on the Adblock Plus header
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 10 Dec 2025 12:56:31 +0000 (12:56 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 10 Dec 2025 12:56:31 +0000 (12:56 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/dnsbl/sources.py

index c6fdb968ebe7115bafa17d2bbf9260c66e0db76d..88c99fcdf825968db61c31d9a7d360c44b6ac5d1 100644 (file)
@@ -262,7 +262,7 @@ 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]":
+               if line == "[Adblock Plus]" or line.startswith("||"):
                        return Format.ADBLOCKPLUS
 
                # Is this a hosts file?