mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 20:16:04 +01:00
closes #5621
This commit is contained in:
@@ -344,10 +344,15 @@ authenticationController.localLogin = function (req, username, password, next) {
|
||||
var uid;
|
||||
var userData = {};
|
||||
|
||||
if (!password || !utils.isPasswordValid(password)) {
|
||||
return next(new Error('[[error:invalid-password]]'));
|
||||
}
|
||||
|
||||
if (password.length > 4096) {
|
||||
return next(new Error('[[error:password-too-long]]'));
|
||||
}
|
||||
|
||||
async.waterfall([
|
||||
function (next) {
|
||||
user.isPasswordValid(password, next);
|
||||
},
|
||||
function (next) {
|
||||
user.getUidByUserslug(userslug, next);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user