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

CommentFileSizeAuthor
#1 2293977-password-strength.patch1.36 KBcoltrane

Comments

coltrane’s picture

Status: Active » Needs review
StatusFileSize
new1.36 KB

https://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.

coltrane’s picture

This function could later be adapted to apply per-user or role logic to whether password strength should be enforced.

  • coltrane committed 0abe5ee on 7.x-1.x
    Issue #2293977 by coltrane: Do not alter form if library is missing or...
coltrane’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.