diff --git a/server.go b/server.go index dc83934..b0cb150 100644 --- a/server.go +++ b/server.go @@ -224,7 +224,7 @@ func timestampOldThan(ts int32, sec int32) bool { func buildSignature(token string) (signature, timestamp, nonce string) { timestamp = fmt.Sprintf("%d", int32(time.Now().Unix())) - nonce = "1461107899" //a randome string cut from previous wechat request + nonce = RandStringRunes(10) // "1461107899" //a randome string cut from previous wechat request signature = calculateSignature(timestamp, nonce, token) return }