From 923130d6b5412201a5f487496d56e6f9ad09417d Mon Sep 17 00:00:00 2001 From: Bob Halley Date: Tue, 6 Oct 2020 09:33:57 -0700 Subject: [PATCH] we should not canonicalize SVCB/HTTPS alias target either! --- dns/rdtypes/svcbbase.py | 2 +- tests/test_svcb.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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') -- 2.47.3