fixed issue 1227, entropy check with IS_STRONG, thanks Clavin Sim

This commit is contained in:
mdipierro
2012-12-17 08:50:08 -06:00
parent 3dd857aa9f
commit d115b4216c
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.3.1 (2012-12-17 08:45:52) dev
Version 2.3.1 (2012-12-17 08:49:20) dev
+3 -2
View File
@@ -468,8 +468,9 @@ class PasswordWidget(FormWidget):
requires = [requires]
is_strong = [r for r in requires if isinstance(r, IS_STRONG)]
if is_strong:
output.append(SCRIPT("web2py_validate_entropy(jQuery('#%s'),%s);"
% (attr['_id'], is_strong[0].entropy)))
output.append(SCRIPT("web2py_validate_entropy(jQuery('#%s'),%s);" % (
attr['_id'], is_strong[0].entropy
if is_strong[0].entropy else "null")))
# end entropy check
return output