mirror of
https://github.com/MedzikUser/HomeDisk.git
synced 2024-08-14 21:46:53 +00:00
fix (/fs/register): fix validate if username is too long
This commit is contained in:
parent
43c31bca6a
commit
0c439b55a2
1 changed files with 2 additions and 2 deletions
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue