debugging...

This commit is contained in:
Adnan Hajdarevic 2015-01-15 16:37:34 +01:00
parent fb8ac8564b
commit f5276ea955

View file

@ -99,8 +99,10 @@ func hookHandler(req *http.Request, params martini.Params) string {
mac.Write(body)
expectedMAC := mac.Sum(nil)
l4g.Info("Expected %s, got %s.", expectedMAC, signature)
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
}
}