mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-05 10:22:31 +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
d8f32cb05a
commit
a03f7c8948
@ -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