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

HIBPOfflineCheck reporting HIBP API error #47

Closed
koitsu opened this issue Aug 26, 2022 · 6 comments
Closed

HIBPOfflineCheck reporting HIBP API error #47

koitsu opened this issue Aug 26, 2022 · 6 comments

Comments

@koitsu
Copy link

koitsu commented Aug 26, 2022

Today while adding and updating some new entries in KeePass I noticed that all my modifications resulted in the "Have I been pwned?" field/column showing "HIBP API error".

I checked the official HIBP website and their Twitter feed and I did not see anything about an outage or API changes, so I'm confused as to what the issue is.

I am using the Online mode, obviously. (I have no interest in using the Offline mode, re: database is enormous and I am not going to put that on my systems. I rarely need to do HIBP checks anyway, so my API usage is certainly super low.)

  • OS: Windows 7 Ultimate SP1 x64
  • KeePass Version: 2.51.1
  • Plugin Version: 1.7.7.0

Let me know what information I can provide for troubleshooting, and how I can provide it. (I do not know how to get debug information from a KeePass plugin).

@mihaifm
Copy link
Owner

mihaifm commented Aug 26, 2022

Hi, I just tried this, I'm not getting any error.
It could be a connection issue on your side. Can you check the proxy setting in KeePass and make sure it's set to "System":

Tools -> Options -> Advanced -> Proxy button at the bottom -> Use system proxy settings

You can also try to query the API directly with curl, see if you get any response:

curl https://api.pwnedpasswords.com/range/4f0a1

@koitsu
Copy link
Author

koitsu commented Aug 26, 2022

No proxy is in use (i.e. value set to "System" and I do not have a proxy set system-wide).

curl https://api.pwnedpasswords.com/range/4f0a1 from the same system works fine.

I'm looking closer now, and it seems that "HIBP API error" is consistently returned for some entries but not others. Re-trying ones with errors still results in the same error. In other words: the problem is very selective, and not something like rate-limiting. It's as if the HIBP API is failing on certain passwords or hashes (not sure what the plugin submits to their API).

I just ran a full check on 45 password entries; 5 of them consistently report "HIBP API error", while the remaining 40 are fine.

Sadly I cannot provide you an example password DB with such an entry because, well, it should be obvious. :)

How can I troubleshoot this further?

@mihaifm
Copy link
Owner

mihaifm commented Aug 26, 2022

Yea I tried it again and indeed it replicates for some passwords and not others. It seems like the API sometimes sends a blank line at the end of the response, which is causing an exception when processing it. Not sure why the blank line is only sent for some passwords and not all of them.

Anyway it's an easy fix, I will release a new version shortly. Thanks for troubleshooting this.

@mihaifm
Copy link
Owner

mihaifm commented Aug 26, 2022

Uploaded a new release that fixes the issue. Thank you again for reporting this.

@mihaifm mihaifm closed this as completed Aug 26, 2022
@koitsu
Copy link
Author

koitsu commented Aug 27, 2022

Thanks! I'll be working on getting an updated package pushed out for the Chocolatey package of your plugin as well.

@mihaifm
Copy link
Owner

mihaifm commented Aug 27, 2022

Good stuff, thanks for that

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