Procházet zdrojové kódy

using real random string as nonce.

master
Patrick Peng Sun před 8 roky
rodič
revize
42c3f42a66
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. +1
    -1
      server.go

+ 1
- 1
server.go Zobrazit soubor

@@ -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
}

Načítá se…
Zrušit
Uložit