mirror of
https://github.com/tiny-craft/tiny-rdm.git
synced 2025-10-04 23:02:47 +08:00
chore: forbid rename key in cluster mode
This commit is contained in:
@@ -14,6 +14,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
"tinyrdm/backend/types"
|
||||
"unicode/utf8"
|
||||
)
|
||||
|
||||
// ConvertTo convert string to specified type
|
||||
@@ -187,7 +188,9 @@ func decodeJson(str string) (string, bool) {
|
||||
|
||||
func decodeBase64(str string) (string, bool) {
|
||||
if decodedStr, err := base64.StdEncoding.DecodeString(str); err == nil {
|
||||
return string(decodedStr), true
|
||||
if s := string(decodedStr); utf8.ValidString(s) {
|
||||
return s, true
|
||||
}
|
||||
}
|
||||
return str, false
|
||||
}
|
||||
|
Reference in New Issue
Block a user