fix (/fs/register): fix validate if username is too long

This commit is contained in:
MedzikUser 2022-04-30 22:38:58 +02:00
parent 43c31bca6a
commit 0c439b55a2
No known key found for this signature in database
GPG Key ID: A5FAC1E185C112DB
1 changed files with 2 additions and 2 deletions

View File

@ -22,8 +22,8 @@ pub async fn handle(
return Err(ServerError::AuthError(AuthError::UsernameTooShort));
}
// username must be less than 20 characters
if request.username.len() < 20 {
// username must be less than 25 characters
if request.username.len() > 25 {
return Err(ServerError::AuthError(AuthError::UsernameTooLong));
}