]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
leading single colons are just as bad as trailing ones
authorBob Halley <halley@dnspython.org>
Fri, 14 Aug 2020 20:29:24 +0000 (13:29 -0700)
committerBob Halley <halley@dnspython.org>
Fri, 14 Aug 2020 20:29:24 +0000 (13:29 -0700)
dns/ipv6.py

index faadb7c294b1756cf0a9d6ee553709dcb736b83b..f0e522c0c451c53d08b2f6dd514cc87871e2048a 100644 (file)
@@ -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::'
     #