@robocoder opened this issue on January 14th 2010

core/Common.php getIp() uses ip2long(). This only works for ipv4 addresses.

ipv6 addresses result in 0 (and are converted back as "").

@robocoder commented on January 14th 2010

Unit tests should ensure these formats are handled: - 2001:0db8:85a3:0000:0000:8a2e:0370:7334 - 2001:db8:85a3:0:0:8a2e:370:7334 (leading zeros omitted) - 2001:db8:85a3::8a2e:370:7334 (groups of zeros omitted) - ::ffff:c000:280 and ::ffff: quad notation for ipv4 mapped addresses)

@robocoder commented on January 15th 2010

MySQL bigint is 8 bytes and won't accommodate a 128 bit ipv6 address. So... we'll defer comment:2 for post-1.0.

The current proposal is: - Installation: detect ipv6 REMOTE_ADDR and warn - core/Common.php: getIp() - accept IPv4-mapped addresses prefixed by ::ffff:

@robocoder commented on January 16th 2010

(In [1790]) fixes #1110 - warn if IPv6 address detected during Installation; handle IPv4 mapped addresses

This issue was closed on January 16th 2010
Powered by GitHub Issue Mirror