houseabsolute / Data-Validate-IP

IPv4 and IPv6 validation methods
https://metacpan.org/release/Data-Validate-IP/
Other
4 stars 1 forks source link

Handle invalid IPv6 addresses with leading 0s #7

Closed oschwald closed 8 years ago

oschwald commented 8 years ago

Closes #6.

Took option (3), although it wasn't particularly ingenious. Fixing the first digit to 0 was enough to significantly speed up the regex, and I believe this is the only such case with inet_pton in my testing.

autarch commented 8 years ago

Merged from the CLI.