misc updates

This commit is contained in:
Dean Karn
2018-07-31 08:49:07 -07:00
parent fe5cf5a911
commit 865045c8ba
5 changed files with 3 additions and 403 deletions
+1 -1
View File
@@ -152,7 +152,7 @@ func (hook Webhook) Parse(r *http.Request, events ...Event) (interface{}, error)
return nil, ErrMissingHubSignatureHeader
}
mac := hmac.New(sha1.New, []byte(hook.secret))
mac.Write(payload)
_, _ = mac.Write(payload)
expectedMAC := hex.EncodeToString(mac.Sum(nil))
if !hmac.Equal([]byte(signature[5:]), []byte(expectedMAC)) {