- invalid domains should most be logged as warnings, not debug levels but
sometimes it is okay
- allow RFC 2782 compliant domains (with underscore)
if block["blocked"] in [None, ""]:
logger.debug("block[blocked]='%s' is empty - SKIPPED!", block["blocked"])
continue
- elif not validators.domain(block["blocked"]):
+ elif not validators.domain(block["blocked"], rfc_2782=True):
logger.warning("block[blocked]='%s' is not a valid domain - SKIPPED!", block["blocked"])
continue
elif block["blocked"].endswith(".onion"):
domains.append(domain)
if not validators.domain(domain, rfc_2782=True):
- logger.debug("domain='%s' is not a valid domain - SKIPPED!")
+ logger.warning("domain='%s' is not a valid domain - SKIPPED!")
continue
elif blacklist.is_blacklisted(domain):
logger.debug("domain='%s' is blacklisted - SKIPPED!", domain)
logger.debug("instance='%s'", instance)
if not validators.domain(instance, rfc_2782=True):
- logger.debug("instance='%s' is not a valid domain - SKIPPED!", instance)
+ logger.warning("instance='%s' is not a valid domain - SKIPPED!", instance)
continue
elif instance.endswith(".onion"):
logger.debug("instance='%s' is a TOR .onion instance - SKIPPED", instance)