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)

Revisions and Commits

Restricted Differential Revision

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:

  • phabricator: d41aaba2a184e0f57c68dfd56c95e628d55d8995 (Mon, Feb 1)
  • arcanist: 57f6fb59d73994d90cd94143787424ce0fdbf73b (Mon, Jan 25)
  • phutil: f43291e99d36045bc459e5133454c0d8fd8768ea (Thu, Jan 21)

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

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.

epriestley added a revision: Restricted Differential Revision.Feb 2 2016, 6:09 PM
epriestley closed this task as Resolved by committing Restricted Diffusion Commit.Feb 2 2016, 6:13 PM
epriestley added a commit: Restricted Diffusion Commit.

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