mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +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]]');
|
||||
}
|
||||
|
||||
if (userData.password.length > 4096) {
|
||||
throw new Error('[[error:password-too-long]]');
|
||||
}
|
||||
|
||||
user.isPasswordValid(userData.password);
|
||||
|
||||
res.locals.processLogin = true; // set it to false in plugin if you wish to just register only
|
||||
|
||||
Reference in New Issue
Block a user