fix_: bio length check (#5074)

This commit is contained in:
Mohsen 2024-04-24 20:41:08 +03:00 committed by GitHub
parent 68bc9d39fd
commit 70a9996d82
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -1 +1 @@
0.179.2
0.179.8

View File

@ -6,6 +6,7 @@ import (
"fmt"
"runtime"
"strings"
"unicode/utf8"
utils "github.com/status-im/status-go/common"
"github.com/status-im/status-go/multiaccounts/settings"
@ -100,7 +101,7 @@ func (m *Messenger) SaveSyncDisplayName(displayName string, clock uint64) error
}
func ValidateBio(bio *string) error {
if len(*bio) > maxBioLength {
if utf8.RuneCountInString(*bio) > maxBioLength {
return ErrInvalidBioLength
}
return nil