ソースを参照

using real random string as nonce.

master
Patrick Peng Sun 8年前
コミット
42c3f42a66
1個のファイルの変更1行の追加1行の削除
  1. +1
    -1
      server.go

+ 1
- 1
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
}

読み込み中…
キャンセル
保存