mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 09:06:15 +01:00
fix: disallow registration attempts with password length > 4096
This is a stopgap measure for v1.15.0
This commit is contained in:
@@ -94,6 +94,10 @@ authenticationController.register = async function (req, res) {
|
|||||||
throw new Error('[[user:change_password_error_match]]');
|
throw new Error('[[user:change_password_error_match]]');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (userData.password.length > 4096) {
|
||||||
|
throw new Error('[[error:password-too-long]]');
|
||||||
|
}
|
||||||
|
|
||||||
user.isPasswordValid(userData.password);
|
user.isPasswordValid(userData.password);
|
||||||
|
|
||||||
res.locals.processLogin = true; // set it to false in plugin if you wish to just register only
|
res.locals.processLogin = true; // set it to false in plugin if you wish to just register only
|
||||||
|
|||||||
Reference in New Issue
Block a user