🐛 fix #527 189 upload name contains +

pull/548/head
Xhofe 2022-02-12 20:27:38 +08:00
parent 387e8af422
commit 5c42354b01
1 changed files with 7 additions and 1 deletions

View File

@ -115,12 +115,18 @@ func EncodeParam(v url.Values) string {
}
buf.WriteString(k)
buf.WriteByte('=')
buf.WriteString(strings.ReplaceAll(v, "&", "%26"))
buf.WriteString(encode(v))
}
}
return buf.String()
}
func encode(str string) string {
str = strings.ReplaceAll(str, "&", "%26")
str = strings.ReplaceAll(str, "+", "%2B")
return str
}
func AesEncrypt(data, key []byte) []byte {
block, _ := aes.NewCipher(key)
if block == nil {