mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-23 02:42:28 +01: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:
parent
da20866967
commit
af6b5a6594
@ -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) {
|
||||
|
@ -18,6 +18,6 @@
|
||||
|
||||
export class UserLimits {
|
||||
maxGuilds: number = 1048576;
|
||||
maxUsername: number = 127;
|
||||
maxUsername: number = 32;
|
||||
maxFriends: number = 5000;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user