diff options
author | David Rothstein <drothstein@gmail.com> | 2015-10-12 01:55:33 -0400 |
---|---|---|
committer | David Rothstein <drothstein@gmail.com> | 2015-10-12 01:55:33 -0400 |
commit | f33147e9b49facc6c6fc93c25a6f9fab992843b6 (patch) | |
tree | f154bd3a2fe2281d2ceb2ae0cf847e2925d482dc | |
parent | 69b1ff814b49cb6bb8c0108df77e3ef18852ec81 (diff) | |
download | brdo-f33147e9b49facc6c6fc93c25a6f9fab992843b6.tar.gz brdo-f33147e9b49facc6c6fc93c25a6f9fab992843b6.tar.bz2 |
Issue #2254235 by AohRveTPV, mahtoranjeet, er.pushpinderrana, yogen.prasad, ashutoshsngh, Manjit.Singh, Charles Belov, nod_, droplet: Don't include leading and trailing spaces in password strength
-rw-r--r-- | modules/user/user.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/user/user.js b/modules/user/user.js index d182066ad..4cf981611 100644 --- a/modules/user/user.js +++ b/modules/user/user.js @@ -93,6 +93,8 @@ Drupal.behaviors.password = { * Returns the estimated strength and the relevant output message. */ Drupal.evaluatePasswordStrength = function (password, translate) { + password = $.trim(password); + var weaknesses = 0, strength = 100, msg = []; var hasLowercase = /[a-z]+/.test(password); |