-
Notifications
You must be signed in to change notification settings - Fork 76
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
Make scoring thresholds configurable #222
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MrWook Looks good overall, but might benefit from slightly clearer names (really minor though). I've included suggestions that I think are clearer, but naming is always hard, so feel free to adjust.
I've also made a suggestion on the doc comment. I think it would be good to explain just a little bit about why these values are configurable.
@camerondm9 thank you very much for the review! I adjusted the code according to your suggestions. I just didn't used the underscore in the naming. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One spot where documentation could be a little clearer, and one typo.
docs/guide/getting-started/README.md
Outdated
} | ||
|
||
result.crackTimesDisplay # same keys as result.crackTimesSeconds, | ||
# with friendlier display string values: | ||
# "less than a second", "3 hours", "centuries", etc. | ||
|
||
result.score # Integer from 0-4 (useful for implementing a strength bar) | ||
result.score # Integer from 0-4 (useful for implementing a strength bar). The scoring is based on the default configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"The scoring is based on the default configuration" could be confusing for someone who has changed the configuration. It might be better to just say that this is configurable (using timeEstimationValues
) and uses defaults if not configured...
docs/guide/options/README.md
Outdated
| levenshteinThreshold | number | 2 | Threshold for levenshtein | | ||
| l33tMaxSubstitutions | number | 100 | Indicated the max substituions for the l33t matcher to prevent DOS | | ||
| maxLength | Object | 256 | Defines how many characters of the password are checked | | ||
| timeEstimationValues | number | {} | Define the values to calculate the scoring and attack times | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you changed the wrong line here.
maxLength
should be a number
timeEstimationValues
should be an Object
Closed in favor of #250 |
@camerondm9
Resolves #217
This would be a breaking change as the attack times need to be configurable too which means the naming need to be changed.