mirror of
https://github.com/spacebarchat/server.git
synced 2026-05-25 01:35:29 +00:00
Merge pull request from GHSA-r7h4-76f7-6264
* Actually use maxUsername config value. * Change maxUsername default to discord.com default
This commit is contained in:
@@ -129,6 +129,16 @@ router.patch(
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
const { maxUsername } = Config.get().limits.user;
|
||||
if (check_username.length > maxUsername) {
|
||||
throw FieldErrors({
|
||||
username: {
|
||||
code: "USERNAME_INVALID",
|
||||
message: `Username must be less than ${maxUsername} in length`,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (body.discriminator) {
|
||||
|
||||
Reference in New Issue
Block a user