domainaware / checkdmarc

A parser for SPF and DMARC DNS records
https://domainaware.github.io/checkdmarc
Apache License 2.0
244 stars 76 forks source link

test_dnssec method incorrectly accessing the cache #136

Closed mohammad-latacora closed 1 month ago

mohammad-latacora commented 3 months ago

https://github.com/domainaware/checkdmarc/blob/3d3da6edee43f2b03c28d0747c95f202be25fd92/checkdmarc/dnssec.py#L109

This line is attempting to access a cache within a cache. This throws an unhashable type: 'ExpiringDict' error.

This should instead be:

  if domain in cache:
      return cache[domain]

This is identical to what is used by the get_dnskey method on line 57

mohammad-latacora commented 3 months ago

Opened PR #137 to fix this.