From f33147e9b49facc6c6fc93c25a6f9fab992843b6 Mon Sep 17 00:00:00 2001 From: David Rothstein <drothstein@gmail.com> Date: Mon, 12 Oct 2015 01:55:33 -0400 Subject: [PATCH] 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 --- modules/user/user.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/user/user.js b/modules/user/user.js index d182066ad826..4cf981611e91 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); -- GitLab