Skip to content

Commit

Permalink
Merge pull request #18208 from liviuconcioiu/18093
Browse files Browse the repository at this point in the history
Fix #18093 - Checks if username is defined
  • Loading branch information
MauricioFauth committed Mar 4, 2023
2 parents 1d26748 + 292a12d commit 74a15b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/src/functions.js
Expand Up @@ -516,7 +516,7 @@ Functions.checkPasswordStrength = function (value, meterObject, meterObjectLabel
'my',
'admin',
];
if (username !== null) {
if (username) {
customDict.push(username);
}

Expand Down Expand Up @@ -584,7 +584,7 @@ Functions.suggestPassword = function (passwordForm) {
passwordForm.elements.pma_pw2.value = passwd.value;
var meterObj = $jQueryPasswordForm.find('meter[name="pw_meter"]').first();
var meterObjLabel = $jQueryPasswordForm.find('span[name="pw_strength"]').first();
Functions.checkPasswordStrength(passwd.value, meterObj, meterObjLabel);
Functions.checkPasswordStrength(passwd.value, meterObj, meterObjLabel, passwordForm.elements.username.value);
return true;
};

Expand Down

0 comments on commit 74a15b5

Please sign in to comment.