pear/Net_IPv6 — pull request #3 by phil-davis (2013-03-13 04:51:51+00:00)
Title: Do not allow 1:2:3:4:5:6:7:8::9 as an IPv6 address

checkIPv6 returns "true" for addresses like:
1::2:3:4:5:6:7:8:9
1:2::3:4:5:6:7:8:9
...
1:2:3:4:5:6:7::8:9
1:2:3:4:5:6:7:8::9
these also emit the message:
Warning: str_repeat(): Second argument has to be greater than or equal to 0 in /etc/inc/IPv6.inc (or whatever file this code is in)
It is fixed by making uncompress() always insert at least one ":0:" for any "::" in the address - a "::" always implies at least ":0:". This removes the str_repeat() warning, and means that the uncompressed IPv6 address has >8 numbers in it, so it fails the later validity check, because does not have exactly 8 hex numbers.