-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IPv6 Causes IPAddr::InvalidAddressError #1210
Comments
* Create methods removing port from ip addresses; Add test * Update geocoder_reject_non_ipv4_addresses; Add more tests
Handle IPv6 addresses when removing port numbers in request.location. Closes #1210
Handle IPv6 addresses when removing port numbers in request.location. Closes alexreisner#1210
@alexreisner , I have doubts this is an issue. At least,
^ Almost all the values are Lets try to pass a port:
What do you think about this? Should it work with pure ip_address as it works with port? |
@vbyno Good question. Currently, the port is not stripped before this sort of query happens, only when deriving the user's IP address in a controller. I'm hesitant to always strip it out, because it would make it impossible to do a query for an IP address that included a port, which someone might want to do. Does that make sense? |
@alexreisner , it looks like my mistake. I thought |
@vbyno you're right. Can you open a new issue to discuss? I'd call it: IP Address Not Detected for IPv6 with Port |
@alexreisner , Sure! Here is the issue #1396. If any additional clarification is needed, I will provide it. |
The
Geocoder::Request#geocoder_remove_port_from_addresses
method expects IPv4 addresses. When passed an IPv6 address, it incorrectly tries to remove the port by splitting on:
. The syntax for specifying a port with an IPv6 address is specified in RFC 3986. An example:The text was updated successfully, but these errors were encountered: