Correct lengths for username and names
This commit is contained in:
parent
31484dd44a
commit
d86b9027bf
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user