From: Bob Halley Date: Tue, 6 Oct 2020 16:33:57 +0000 (-0700) Subject: we should not canonicalize SVCB/HTTPS alias target either! X-Git-Tag: v2.1.0rc1~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=923130d6b5412201a5f487496d56e6f9ad09417d;p=thirdparty%2Fdnspython.git we should not canonicalize SVCB/HTTPS alias target either! --- diff --git a/dns/rdtypes/svcbbase.py b/dns/rdtypes/svcbbase.py index b8b40594..f757f026 100644 --- a/dns/rdtypes/svcbbase.py +++ b/dns/rdtypes/svcbbase.py @@ -497,7 +497,7 @@ class SVCBBase(dns.rdata.Rdata): def _to_wire(self, file, compress=None, origin=None, canonicalize=False): file.write(struct.pack("!H", self.priority)) - self.target.to_wire(file, None, origin, canonicalize) + self.target.to_wire(file, None, origin, False) for key in sorted(self.params): file.write(struct.pack("!H", key)) value = self.params[key] diff --git a/tests/test_svcb.py b/tests/test_svcb.py index 51126df9..7cd77688 100644 --- a/tests/test_svcb.py +++ b/tests/test_svcb.py @@ -315,7 +315,7 @@ class SVCBTestCase(unittest.TestCase): def test_alias_not_compressed(self): rrs = dns.rrset.from_text('elsewhere.', 300, 'in', 'svcb', - '0 elsewhere.') + '0 elseWhere.') output = io.BytesIO() compress = {} rrs.to_wire(output, compress) @@ -323,4 +323,4 @@ class SVCBTestCase(unittest.TestCase): # Just one of these assertions is enough, but we do both to show # the bug we're checking is fixed. assert not wire.endswith(b'\xc0\x00') - assert wire.endswith(b'\x09elsewhere\x00') + assert wire.endswith(b'\x09elseWhere\x00')