]> git.ipfire.org Git - thirdparty/dnspython.git/commit
Check that a relative name plus the zone's origin is not too long. (#997)
authorBob Halley <halley@dnspython.org>
Sat, 21 Oct 2023 13:38:54 +0000 (06:38 -0700)
committerGitHub <noreply@github.com>
Sat, 21 Oct 2023 13:38:54 +0000 (06:38 -0700)
commit1957961b31725209528f5efce6daa8a5047ab33c
tree89af122bf6faa65693505c57caab0aaa440e0661
parenta52868e84314d409742ea7b9a35b2d610686144e
Check that a relative name plus the zone's origin is not too long. (#997)

Previously it was possible to add very long relative names to a
relative zone which could never be rendered due to being too long for
wire format.  Now we check this as part of _validate_name().

This code also removes duplicated name validation code from Zone and
Version, consolidating it into one helper function.

Finally, we fix a few comments in get methods that have cut-and-paste
typos from the find variant indicating they can raise KeyError when
they cannot.
dns/zone.py
tests/test_zone.py