Problem/Motivation
I installed password_strength and forgot to install the zxcvbn-php. The module appears to work, and shows "Very weak" for all password (even the strong ones). It make it seem that the module is working well, there are no error messages.
The ajax calls response includes this error which isn't surfaced in the UI:
Fatal error: Class 'ZxcvbnPhp\Zxcvbn' not found in /Users/stephane.corlosquet/htdocs/d7-dev/sites/all/modules/password_strength2/password_strength.module
Submitting the form also doesn't throw an error.
Proposed resolution
Display an error when typing a password or submitting the form.
Remaining tasks
patch
User interface changes
Error displayed in the password checker UI.
API changes
TBD
Comments
Comment #1
coltranehttps://www.drupal.org/node/2294131#comment-8937577 adds hook_requirements checks and this patch will not attempt to alter the forms if the library isn't available.
Comment #2
coltraneThis function could later be adapted to apply per-user or role logic to whether password strength should be enforced.
Comment #4
coltraneCommitted.