From d86b9027bfe14babf8ed7958bd46c4af42cef941 Mon Sep 17 00:00:00 2001 From: Jason Streifling Date: Sun, 27 Oct 2024 14:53:37 +0100 Subject: [PATCH] Correct lengths for username and names --- cmd/frontend/users.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/frontend/users.go b/cmd/frontend/users.go index 46df586..fbd705a 100644 --- a/cmd/frontend/users.go +++ b/cmd/frontend/users.go @@ -11,8 +11,8 @@ import ( ) func checkUserStrings(user *b.User) (string, int, bool) { - userLen := 255 - nameLen := 56 // max value when aes encrypting up to 255 bytes + userLen := 63 // max value for utf-8 at 255 bytes + nameLen := 56 // max value when aes encrypting utf-8 at up to 255 bytes if len(user.UserName) > userLen { return "Benutzername", userLen, false