From 15e8fc08ce7425c0b3ac5f95f998255106a4aa3f Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Fri, 10 Sep 2021 11:30:27 +0300 Subject: [PATCH] nft-nd-nns: more checks for IPv6 neo-project/non-native-contracts#7 --- examples/nft-nd-nns/nns.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/nft-nd-nns/nns.go b/examples/nft-nd-nns/nns.go index e45835cf2..0206b9524 100644 --- a/examples/nft-nd-nns/nns.go +++ b/examples/nft-nd-nns/nns.go @@ -617,8 +617,14 @@ func checkIPv6(data string) bool { for i, f := range fragments { if len(f) == 0 { if i == 0 { + if len(fragments[1]) != 0 { + return false + } nums[i] = 0 } else if i == l-1 { + if len(fragments[i-1]) != 0 { + return false + } nums[7] = 0 } else if hasEmpty { return false