Skip to content

Commit e7a1834

Browse files
committed
Apply PR suggestions thanks @cnjack!
1 parent 787ee56 commit e7a1834

File tree

1 file changed

+2
-2
lines changed
  • internal/settings/providers/aliyun

1 file changed

+2
-2
lines changed

internal/settings/providers/aliyun/auth.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ import (
1313
func sign(method string, urlValues url.Values, accessKeySecret string) {
1414
sortedParams := make(sort.StringSlice, 0, len(urlValues))
1515
for key, values := range urlValues {
16-
s := key + "=" + values[0]
16+
s := url.QueryEscape(key) + "=" + url.QueryEscape(values[0])
1717
sortedParams = append(sortedParams, s)
1818
}
1919
sortedParams.Sort()
2020

2121
stringToSign := strings.ToUpper(method) + "&%2F&" +
22-
strings.Join(sortedParams, "&")
22+
url.QueryEscape(strings.Join(sortedParams, "&"))
2323

2424
key := []byte(accessKeySecret + "&")
2525
hmac := hmac.New(sha1.New, key)

0 commit comments

Comments
 (0)