summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2015-10-12 01:55:33 -0400
committerDavid Rothstein <drothstein@gmail.com>2015-10-12 01:55:33 -0400
commitf33147e9b49facc6c6fc93c25a6f9fab992843b6 (patch)
treef154bd3a2fe2281d2ceb2ae0cf847e2925d482dc /modules
parent69b1ff814b49cb6bb8c0108df77e3ef18852ec81 (diff)
downloadbrdo-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
Diffstat (limited to 'modules')
-rw-r--r--modules/user/user.js2
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);