-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
certain bad passwords make it through the filter #51
Comments
Hmm, that's interesting. Will take a look tomorrow. Appreciate the report. |
Well, it's finally tomorrow ;). Had a chance to look, and it seems like the "findGoodEnoughCombination" function is returning different results for those two examples, because the 1 gets transformed into a word using l33t transformations, while the 2 does not give the same word. So for Arvest#1, the matches it returns are unoptimal, and it is determining that the password is random. I am working on a fix for this, fingers crossed it won't be too bad. |
Also, the password "qwer" returns better score (1) than qwert, qwerty, qwertyu... (0) |
@minii-dev That is a perfectly acceptable thing for the library to do, through all the algorithms, using weighted dictionaries, we are calculating that an attacker is more likely to try qwert, qwerty, or qwertyu than they are to try qwer. That is because qwerty is extremely high in the list of "bad passwords", and even though qwer is shorter, an attacker is more likely to try qwerty first because it appears in practically every leaked password dictionary right near the top. The "score" is a simplified representation of the entropy, if you look at the Result you'd see why the assigned the entropy like it did. A score of 1 is still unacceptable, even though it may be higher than qwerty. So that is a totally different situation to the issue mentioned above, which I did actually do some work on the issue @7ep raised, but it introduced other edge cases... I haven't had enough time with how busy work has been to do any more on that side since January though =(. |
Thank you for your answer, it sounds very good. It is strange to me if you say the attacker will try qwert, qwerty, qwertyu with the same chance, and it is much higher than qwer, because produces different score (for so short word, which costs nothing to brute force). I would fully accept your answer in the case the score was the same, but it differs. Do you really think the score 1 for qwer and 0 for qwertyu is correct. Or maybe the correct score should be 0 for both? |
It is a good explanation using the entropy and the threshold and now the difference in score for qwer and qwert is clear to me. Thanx. |
Try this password:
Arvest#1
Expected result: insufficient entropy
Actual result: sufficient
Then try this one:
Arvest#2
Expected result: insufficient entropy
Actual result: is correct - insufficient entropy
You are welcome to use https://github.com/7ep/demo to see this for yourself, in the unit tests at RegistrationUtilsTests at testShouldHaveInsufficientEntropyInPassword
The text was updated successfully, but these errors were encountered: