Page MenuHomePhabricator

fetch log crashes when using IP v6 (http), fetch fails
Closed, ResolvedPublic

Description

Error trace: https://phabricator.pmoreau.org/P85

looks like ip2long should return FALSE, and LISK gets an empty string.

(I don't have an ip6 setup to test this, but the user confirms ip6)

Event Timeline

avivey renamed this task from fetch log crashes when using IP v6 (http) to fetch log crashes when using IP v6 (http), fetch fails.Feb 1 2016, 8:42 PM
avivey created this task.

Not sure if lisk should interpret "false" as "null" in this case?

I'm using PHP 7.0.2 with nginx 1.8.1, and running Phabricator at HEAD:

The result of ip2long:

php > var_dump(ip2long(some_ipv6_address));
bool(false)

FWIW, PHP 7 is not yet supported.

Nevermind me, Google suggests IPv6 a pain in PHP

epriestley added a subscriber: epriestley.

ip2long can also return negative values (see rP30473549).

I'm going to replace this with a LONGTEXT with a nuanced and flavorful description of the remote address.

Tested with rP9d125b459ea8, and it's working properly: thanks for the quick fix!