From e6beb92f70852511755ef8e0290b97a7133db8b1 Mon Sep 17 00:00:00 2001 From: Peter Thomassen Date: Wed, 20 May 2020 15:21:33 +0200 Subject: [PATCH] compare full string against public suffx, not just number of labels --- psl_dns/querier.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/psl_dns/querier.py b/psl_dns/querier.py index 7fd8e64..6e4dc52 100644 --- a/psl_dns/querier.py +++ b/psl_dns/querier.py @@ -83,7 +83,7 @@ def get_rules(self, domain): def is_public_suffix(self, domain, public_suffix=None): public_suffix = public_suffix or self.get_public_suffix(domain) - return domain.count('.') == public_suffix.count('.') + return domain == public_suffix def query(self, domain, rdatatype): # Normalize, then construct QNAME, and retrieve response