From 50051f68595b519caefbb5d2143bcc60124e7b2a Mon Sep 17 00:00:00 2001 From: Bob Halley Date: Fri, 14 Aug 2020 13:29:24 -0700 Subject: [PATCH] leading single colons are just as bad as trailing ones --- dns/ipv6.py | 2 ++ 1 file changed, 2 insertions(+) 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::' # -- 2.47.3