fix: we need to encode the new version, not the original

This commit is contained in:
Derrick Hammer 2024-02-11 05:38:36 -05:00
parent 865c639557
commit 8167255a0a
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 2 deletions

View File

@ -64,8 +64,7 @@ func (whm *WebhookManager) sendWebhooks(request interface{}, r *http.Request) {
} }
} }
payload := getWebhookData(r, whm.logger) payload := toNormalizedJson(payloadBytes)
payload = toNormalizedJson(payload)
signature := generatePayloadSignature(payload, app.WebhookSecret) signature := generatePayloadSignature(payload, app.WebhookSecret)
req.Header.Add("X-Hub-Signature-256", signature) req.Header.Add("X-Hub-Signature-256", signature)