This project is closed and read-only.
Actions
Backport #7477
closedCertain valid IPv6 Addresses are not recognized as valid
Backport #7477:
Certain valid IPv6 Addresses are not recognized as valid
Status:
Closed
Assignee:
Description
IPv6 addresses of the format:
::2:3:4:5:6:7:8
and
2:3:4:5:6:7:8::
improperly raise an InvalidAddressError
This is because this line (https://github.com/ruby/ruby/blob/trunk/lib/ipaddr.rb#L552) ignores the edge cases where there are 8 colons but the IPv6 still matches the compressed format (RE_IPV6ADDRLIKE_COMPRESSED).
the following patch will resolve this bug.
--- ipaddr.rb 2012-11-29 22:11:05.000000000 -0800
+++ ipaddrpatch.rb 2012-11-29 22:07:30.000000000 -0800
@@ -548,11 +548,15 @@
addr = in_addr($~[4,4])
left = $1
right = $3 + '0:0'
- else
Files
Actions