Correct lengths for username and names

This commit is contained in:
Jason Streifling 2024-10-27 14:53:37 +01:00
parent 31484dd44a
commit d86b9027bf

View File

@ -11,8 +11,8 @@ import (
) )
func checkUserStrings(user *b.User) (string, int, bool) { func checkUserStrings(user *b.User) (string, int, bool) {
userLen := 255 userLen := 63 // max value for utf-8 at 255 bytes
nameLen := 56 // max value when aes encrypting up to 255 bytes nameLen := 56 // max value when aes encrypting utf-8 at up to 255 bytes
if len(user.UserName) > userLen { if len(user.UserName) > userLen {
return "Benutzername", userLen, false return "Benutzername", userLen, false