Skip to content

DivisionByZero in entropy validator #22

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

Closed
kouk opened this issue Oct 29, 2014 · 1 comment
Closed

DivisionByZero in entropy validator #22

kouk opened this issue Oct 29, 2014 · 1 comment

Comments

@kouk
Copy link

kouk commented Oct 29, 2014

In the entropy validator you divide the password entropy by the ideal entropy based on the string length. However in it's method ideal_entropy you take math.log(1/length), which for a length of 1 is equal to zero. This leads to division by zero.

kouk added a commit to kouk/django-password-policies that referenced this issue Oct 29, 2014
@tarak
Copy link
Owner

tarak commented Nov 9, 2014

Merged. Thx.

@tarak tarak closed this as completed Nov 9, 2014
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