]> git.ipfire.org Git - dbl.git/commitdiff
sources: Abort if we are importing our own canary
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 16 Feb 2026 19:30:57 +0000 (19:30 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 16 Feb 2026 19:30:57 +0000 (19:30 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/dbl/sources.py

index f2c987070ffadcc2924e77e3afed5a5825707a63..dd67147af40ae218077fd6b8e7e9058374b3b0c3 100644 (file)
@@ -299,6 +299,12 @@ class Source(sqlmodel.SQLModel, database.BackendMixin, table=True):
                                                                log.debug("Skipping ignored domain: %s" % domain)
                                                                continue
 
+                                                       # Abort if we have imported the canary
+                                                       if domain == self.list.canary:
+                                                               log.error("Found our canary in %s, aborting import" % self)
+
+                                                               return False
+
                                                        # Is the domain actually publicly resolvable?
                                                        if not self.backend.psl.get_tld(domain, strict=True):
                                                                log.debug("Skipping non-public domain: %s" % domain)