Skip to content
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

Total IP usage counted twice in IPinfo.io dashboard #101

Closed
itsiprikshit opened this issue Jan 30, 2024 · 4 comments
Closed

Total IP usage counted twice in IPinfo.io dashboard #101

itsiprikshit opened this issue Jan 30, 2024 · 4 comments

Comments

@itsiprikshit
Copy link

I am using the Python ipinfo module to geolocate some IP addresses. You can see my test code below -

import ipinfo

access_token = "TOKEN"

handler = ipinfo.getHandler(access_token)

lookup = ['8.8.8.8', '8.8.4.4']

details = handler.getBatchDetails(lookup)

I am just requesting info for 2 IP addresses but when I open up my ipinfo dashboard, the usage count increases by 4.

What I found interesting is that even though I am requesting information for just 2 IP addresses, the ipinfo handler is sending 4 IP addresses in the POST request to the servers where in each IP is added twice.

When I checked the getBatchDetails method, I found that the IP addresses are being appended twice to the lookup list here and here.

Am I missing something here?
I'd like to know why an IP address is added to the lookup twice.

Thanks

@UmanShahzad
Copy link
Contributor

This seems to have been added in 8bb867a to take care of the non-bogon case, but indeed that was useless and a mistake since we already add it afterwards.

Deleting this, thanks so much for catching this.

@UmanShahzad
Copy link
Contributor

UmanShahzad commented Jan 31, 2024

The problem also doesn't exist in the async handler (except in the iterator) but it does in the sync handler, so likely the issue was detected but not solved in both places.

@UmanShahzad
Copy link
Contributor

@itsiprikshit
Copy link
Author

Thank you for adding the fix.
My monthly IP lookups got exhausted due to this bug, even though I only requested half the lookups.
Anyways, thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants