]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Avoid infinite recursion when unpickling an Answer [#1224] 2.8
authorBob Halley <halley@dnspython.org>
Mon, 15 Sep 2025 19:19:29 +0000 (12:19 -0700)
committerBob Halley <halley@dnspython.org>
Mon, 15 Sep 2025 19:21:47 +0000 (12:21 -0700)
(cherry picked from commit 25ee91f0cea274d1836d2175c98e76af7c777fd6)

dns/resolver.py

index 923bb4b4682cb3a5859d79015bebcb30ef980242..0c0790e5c175ebd500f0ab4434916244e7f40dd1 100644 (file)
@@ -283,7 +283,7 @@ class Answer:
         self.expiration = time.time() + self.chaining_result.minimum_ttl
 
     def __getattr__(self, attr):  # pragma: no cover
-        if self.rrset is not None:
+        if attr != "rrset" and self.rrset is not None:
             if attr == "name":
                 return self.rrset.name
             elif attr == "ttl":