tarak / django-password-policies

Django unicode-aware password policies.
Other
59 stars 92 forks source link

DivisionByZero in entropy validator #22

Closed kouk closed 10 years ago

kouk commented 10 years ago

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.

tarak commented 10 years ago

Merged. Thx.