spot-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Castille Epee <castleguard...@gmail.com>
Subject Bug in get_ip_geo_localization
Date Thu, 28 Sep 2017 19:23:52 GMT
Folks,

A couple of issues in how geoloc lookup is being done.

a) There is an assumption that the iploc.csv is in sorted ascending order.
b) The bisect.bisect method used (even if the iploc.csv was sorted) would
only work if the iploc had no discontinuities, there is no check after
bisect call to see if the actual IP being looked up existed in the range.
It should have checked for the IP falling in the range before returning it.

Before we gen up a patch, could someone confirm if the above analysis is
correct?

We have created some scripts to create a iploc.csv file from public sources
(- domain / owner information). If there is any interest drop me note.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message