Skip to content

Commit

Permalink
最后一次
Browse files Browse the repository at this point in the history
  • Loading branch information
lianhong2758 committed Aug 18, 2023
1 parent 6d54871 commit a2187bf
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions plugin/bilibili/bilibilipush.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,17 +233,14 @@ func wbiSign(params map[string]string, imgKey string, subKey string) map[string]
params["wts"] = currTime
// Sort keys
keys := make([]string, 0, len(params))
for k := range params {
keys = append(keys, k)
}
sort.Strings(keys)
// Remove unwanted characters
for k, v := range params {
keys = append(keys, k)
for _, old := range replacements {
v = strings.ReplaceAll(v, old, "")
}
params[k] = v
}
sort.Strings(keys)
h := md5.New()
for k, v := range keys {
h.Write([]byte(v))
Expand Down

0 comments on commit a2187bf

Please sign in to comment.