mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-06 08:55:36 +02:00
fix: login with weak password
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user