mirror of https://github.com/Xhofe/alist
🐛 fix #527 189 upload name contains +
parent
387e8af422
commit
5c42354b01
|
@ -115,12 +115,18 @@ func EncodeParam(v url.Values) string {
|
||||||
}
|
}
|
||||||
buf.WriteString(k)
|
buf.WriteString(k)
|
||||||
buf.WriteByte('=')
|
buf.WriteByte('=')
|
||||||
buf.WriteString(strings.ReplaceAll(v, "&", "%26"))
|
buf.WriteString(encode(v))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return buf.String()
|
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 {
|
func AesEncrypt(data, key []byte) []byte {
|
||||||
block, _ := aes.NewCipher(key)
|
block, _ := aes.NewCipher(key)
|
||||||
if block == nil {
|
if block == nil {
|
||||||
|
|
Loading…
Reference in New Issue