From d7be43f91329cf2b3f389e7c3421e149efa3aaa8 Mon Sep 17 00:00:00 2001 From: Stephan de Wit Date: Fri, 23 Dec 2022 09:16:03 +0100 Subject: [PATCH] unbound / dnsbl_module.py: safeguard retrieval of blocklist shortcode --- .../service/templates/OPNsense/Unbound/core/dnsbl_module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/opnsense/service/templates/OPNsense/Unbound/core/dnsbl_module.py b/src/opnsense/service/templates/OPNsense/Unbound/core/dnsbl_module.py index f847956b7..00e914e82 100644 --- a/src/opnsense/service/templates/OPNsense/Unbound/core/dnsbl_module.py +++ b/src/opnsense/service/templates/OPNsense/Unbound/core/dnsbl_module.py @@ -177,7 +177,7 @@ class ModuleContext: if self.dnsbl_available and qtype in rr_types and domain in mod_env['dnsbl']['data']: qstate.return_rcode = self.rcode - blocklist = mod_env['dnsbl']['data'][domain]['bl'] + blocklist = mod_env['dnsbl']['data'][domain].get('bl') dnssec_status = sec_status_secure if self.dnssec_enabled else sec_status_unchecked ttl = 3600