mirror of
https://github.com/adnanh/webhook.git
synced 2025-05-12 08:34:43 +00:00
debugging...
This commit is contained in:
parent
fb8ac8564b
commit
f5276ea955
1 changed files with 3 additions and 1 deletions
|
@ -99,8 +99,10 @@ func hookHandler(req *http.Request, params martini.Params) string {
|
||||||
mac.Write(body)
|
mac.Write(body)
|
||||||
expectedMAC := mac.Sum(nil)
|
expectedMAC := mac.Sum(nil)
|
||||||
|
|
||||||
|
l4g.Info("Expected %s, got %s.", expectedMAC, signature)
|
||||||
|
|
||||||
if !hmac.Equal([]byte(signature), expectedMAC) {
|
if !hmac.Equal([]byte(signature), expectedMAC) {
|
||||||
l4g.Error("Hook %s got matched, but the request contained invalid signature. Expected %s, got %s.", hook.ID, signature, expectedMAC)
|
l4g.Error("Hook %s got matched, but the request contained invalid signature. Expected %s, got %s.", hook.ID, expectedMAC, signature)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue