Coder Social home page Coder Social logo

Comments (8)

davide-scola avatar davide-scola commented on September 28, 2024

hello @bluesmoon,
do you have any news on this, please?

Currently, several users connecting, for example, via VPN or over the Tor network are geolocated in the Islamic Republic of Iran, which, besides being incorrect, raises a number of issues for financial service providers being that country a prohibited jurisdiction.

May I know if you are interested in fixing this issue, please? (using proposal #255 or any other solution)

Thanks,
davide

from node-geoip.

bluesmoon avatar bluesmoon commented on September 28, 2024

I think the problem is far simpler.

For a non-existent location, the parseInt returns NaN, and when we lookup cityLookup, it returns undefined. When we do undefined >>> 0, we get 0. The fix is simply to initialize cityLookup = {NaN: -1} which will get us a value of INT32_MAX.

I'll make an MR for it.

from node-geoip.

davide-scola avatar davide-scola commented on September 28, 2024

hello @bluesmoon,
first of all, thank you for acknowledging this issue, much appreciated.

Personally, I don't think that exploiting an overflow to UINT32_MAX and having NaN as an object key is preferable to starting the line count from 1 but, in any case, thank you very much for fixing it.

Could you please release the new version (1.4.8) so that it can also be installed from the registry?

Thanks,
davide

from node-geoip.

bluesmoon avatar bluesmoon commented on September 28, 2024

Unfortunately npm publish is not working at the moment due to a 404 on the authentication page.

from node-geoip.

davide-scola avatar davide-scola commented on September 28, 2024

hello @bluesmoon,
thank you for the quick response; is npm publish still broken for you?

Thanks,
davide

from node-geoip.

bluesmoon avatar bluesmoon commented on September 28, 2024

Yes. npm just throws a 404 when trying to authenticate.

from node-geoip.

bluesmoon avatar bluesmoon commented on September 28, 2024

ok, got it published.

from node-geoip.

davide-scola avatar davide-scola commented on September 28, 2024

thank you, @bluesmoon, much appreciated 🖖

from node-geoip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.