-
Notifications
You must be signed in to change notification settings - Fork 943
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
without dictionary? #59
Comments
You are going to loose a lot! I suggest to use cache and lazy-loading. Another alternative would be to run zxcvbn on server through AJAX requests, but it is not always a good idea to send the password outside your system for evaluation. It depends on your application design and security model. |
@duzun I see, that's what I thought.. The ajax scenario is not an option because triggering one request for each keyup would probably be slower than downloading the 300kb js file once. |
I am a developer too, but I don't remember the list of top 10'000 most used passwords and I want zxcvbn to evaluate my "pronounceable" passwords. AJAX could be an option if properly set up. Typically keyup happens no more then once every 300ms. If your server is geographically close to the client and you don't have any lags in your app, the response could return in less then 100ms. Even if the server is in US and the client is in Europe, the response still can be kept under 300ms. |
I agree, or validate it right or just don't.. |
obs, I think browsers should ship your library as a native API, nice job. |
One solution could be to load zxcvbn from a public CDN, if you trust it to not maliciously serve a modified (password grabbing? key logging?) version. Then, assuming your website isn't the first one to do so for that user, it has a good chance of loading from the browsers' cache. I know of these two public CDNs with (slightly dated) versions of zxcvbn, with links to their minified versions: I don't trust third parties with the power to control javascript on pages with password entry. To get the suggested advantage anyways, I use an integrity-verifying javascript loader, to discard the received javascript unless it is exactly as expected. If it helps anyone: I wrote one such loader, needjs that allows fallback to other source URLS including, if you like, a copy hosted on your own servers. |
I dislike the CDN idea by many reasons.. In this case even more because unfortunately I never have seen a website using this library. |
Whenever you use a CDN, you should use a subresource integrity hash. |
After some discussion we decided to go with client-side (JS) version of zxcvbn (async, lazyloaded) but we are keeping only the 10k frequent passwords part because our general public is not english speaking. |
@enapupe how did you achieve to use custom dictionary? (10k freq pass) Thanks |
Uh, well, 5 years ago? I think we just removed stuff from the dist file and included the lib file on git. npm was not really a thing back then, maybe Bower was. |
@enapupe I was not sure if you reuse solution in more recent projects, therefore I asked and ignoring the date. Thank you for your answer, but I do not like the solution for maintenance reasons. Then I would rather use https://github.com/davidstutz/password-score which allows to configure dictionaries . Thanks again and happy coding ;) |
Sure, I get that. |
How much would I lose running this library without the dictionary part? My concern is about file size since 300kb download is unacceptable in [my] mobile scenario.. What dropbox does about that?
Thanks for such library, anyhow it is awesome.
The text was updated successfully, but these errors were encountered: