From: Bob Halley Date: Fri, 14 Aug 2020 20:29:24 +0000 (-0700) Subject: leading single colons are just as bad as trailing ones X-Git-Tag: v2.1.0rc1~74 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=50051f68595b519caefbb5d2143bcc60124e7b2a;p=thirdparty%2Fdnspython.git leading single colons are just as bad as trailing ones --- diff --git a/dns/ipv6.py b/dns/ipv6.py index faadb7c2..f0e522c0 100644 --- a/dns/ipv6.py +++ b/dns/ipv6.py @@ -125,6 +125,8 @@ def inet_aton(text, ignore_scope=False): raise dns.exception.SyntaxError elif text.endswith(b':') and not text.endswith(b'::'): raise dns.exception.SyntaxError + elif text.startswith(b':') and not text.startswith(b'::'): + raise dns.exception.SyntaxError elif text == b'::': text = b'0::' #