diff options
| author | Bob Halley <halley@dnspython.org> | 2020-08-21 09:20:17 -0700 |
|---|---|---|
| committer | Bob Halley <halley@dnspython.org> | 2020-08-21 09:20:17 -0700 |
| commit | f789de1e6521cdd5ca11917522259a22ed902ab3 (patch) | |
| tree | b288f34bfdb64141ce14ce367afc98906026f2ed /tests | |
| parent | 683dc5d0c0d3180c778e53e6abdd7ea48b4a3950 (diff) | |
| download | dnspython-f789de1e6521cdd5ca11917522259a22ed902ab3.tar.gz | |
Detect and reject attempts to use compressed names in the generic rdata
syntax of a known type.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_rdata.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_rdata.py b/tests/test_rdata.py index 0c98760..41465e0 100644 --- a/tests/test_rdata.py +++ b/tests/test_rdata.py @@ -737,6 +737,10 @@ class UtilTestCase(unittest.TestCase): b = dns.rdtypes.util.Bitmap([]) b.from_wire_parser(parser) + def test_compressed_in_generic_is_bad(self): + with self.assertRaises(dns.exception.SyntaxError): + dns.rdata.from_text(dns.rdataclass.IN, dns.rdatatype.MX, + r'\# 4 000aC000') if __name__ == '__main__': unittest.main() |
