Skip to content

Commit

Permalink
Merge pull request #306 from fudiwei/bugfix/dogecloud-api-error
Browse files Browse the repository at this point in the history
bugfix #303
  • Loading branch information
usual2970 authored Nov 5, 2024
2 parents 718cfcc + 8549a17 commit 741f3ec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/pkg/vendors/dogecloud-sdk/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ func (c *Client) sendReq(method string, path string, data map[string]interface{}
mime = "application/x-www-form-urlencoded"
}

signStr := path + "\n" + body
path = strings.TrimPrefix(path, "/")
signStr := "/" + path + "\n" + body
hmacObj := hmac.New(sha1.New, []byte(c.secretKey))
hmacObj.Write([]byte(signStr))
sign := hex.EncodeToString(hmacObj.Sum(nil))
Expand Down

0 comments on commit 741f3ec

Please sign in to comment.