mattevans / pwned-passwords Goto Github PK
View Code? Open in Web Editor NEW๐Go client library for checking values against compromised HIBP Pwned Passwords
License: MIT License
๐Go client library for checking values against compromised HIBP Pwned Passwords
License: MIT License
Hi! I've built a little CLI tool on top of your library. Hope that's not a problem https://github.com/apiarian/hibp .
I just read, Troy Hunt blog post about Pwned Passwords, wanted to use it and saw your lib : great job you will save me time.
However I did some code review and saw you are using http.DefaultClient as http client : be careful that DefaultClient has no timeout by default so it make your lib dependant on https://api.pwnedpasswords.com server response. Although pwnedpassword is a well backed API and it will not hang request every day I think it's preferable to avoid the risk and use a custom http.client just to set a timeout.
See this and cloudflare guide to timeout.
I suggest a 3 minutes timeout, because this is the value that may be added to the http.DefaultClient in future Go release
... or maybe add the possibility to pass the wanted timeout value to hibp.NewClient()
It would be nice to have the number of times a password was pwned returned rather than just a true/false value as to whether it was actually pwned.
Then we could add an IsPwned method to the PwnedStore struct to allow a user to use the old behaviour if this was desired.
I'm happy to make this change if it's something you would accept?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.