fix: login with weak password

This commit is contained in:
Barış Soner Uşaklı
2019-12-26 20:17:54 -05:00
parent b9679df784
commit 9d074731f4
2 changed files with 15 additions and 2 deletions

View File

@@ -127,7 +127,7 @@ module.exports = function (User) {
};
User.isPasswordValid = function (password, minStrength) {
minStrength = minStrength || meta.config.minimumPasswordStrength;
minStrength = (minStrength || minStrength === 0) ? minStrength : meta.config.minimumPasswordStrength;
// Sanity checks: Checks if defined and is string
if (!password || !utils.isPasswordValid(password)) {