Bug tracker
"Registered from IP" contains invalid IP address (fix completed in vcs)
10.216.6.118, 161.148.54.145
The user_ip field in the database contains this exact string. When clicking the IP or Whois links in the ACP, PHP throws an error:
[phpBB Debug] PHP Notice: in file /includes/acp/acp_users.php on line 925: gethostbyaddr() [function.gethostbyaddr]: Address is not a valid IPv4 or IPv6 address
and
[phpBB Debug] PHP Notice: in file /includes/acp/acp_users.php on line 60: gethostbyaddr() [function.gethostbyaddr]: Address is not a valid IPv4 or IPv6 address
As another consequence, attempting to ban the user by IP fails with a green info block saying, "No IP addresses or hostnames defined".
I have "Validated X_FORWARDED_FOR header" enabled, and I think this might be related.
See attached screenshot for the IP appearing in ACP.
This bug has been placed in the ACP component, since it is the one most affected, but probably stems from Sessions.
Comments / History
anyway i unable to reproduce. my first thought is caching proxy but on second thought i do not tihnk so. caching proxies can make all remote_addr same and may append original remote_addr to x_forwarded_for to compensate. but i not seen this b4.
generally speaking remote_addr can not be faked with tcp. client sends syn and if it can not get syn-ack back (which it would not with fake ip) it will not work. never mind fact that remote_addr in ipv4 can only be 32 bits. if you try to add ascii string to it routers no know how to route.
We should probably validate the IP address in REMOTE_ADDR to prohibit this. The regex for a valid IPv4 address is relatively simple but the one for an IPv6 address is somewhat more complex so maybe we should come up with some simpler way of validating the address.