From 0368fb10dbb74c6b8f51e45dccd0dfa1117cd2b5 Mon Sep 17 00:00:00 2001 From: jamesread Date: Tue, 6 Jan 2026 22:15:37 +0000 Subject: [PATCH] fix: wonky merge conflict, and missing body parameter from matcher --- service/internal/webhooks/auth.go | 11 +---------- service/internal/webhooks/matcher.go | 1 - 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/service/internal/webhooks/auth.go b/service/internal/webhooks/auth.go index b81ec31..7c56304 100644 --- a/service/internal/webhooks/auth.go +++ b/service/internal/webhooks/auth.go @@ -2,9 +2,9 @@ package webhooks import ( "crypto/hmac" - "crypto/subtle" "crypto/sha1" "crypto/sha256" + "crypto/subtle" "encoding/hex" "net/http" "strings" @@ -123,14 +123,6 @@ func (v *AuthVerifier) verifyBasic(r *http.Request) bool { return false } -import ( - "crypto/subtle" - // ... existing imports -) - -func (v *AuthVerifier) verifyBasic(r *http.Request) bool { - // ... existing checks ... - parts := strings.SplitN(v.config.Secret, ":", 2) if len(parts) == 2 { usernameMatch := subtle.ConstantTimeCompare([]byte(username), []byte(parts[0])) @@ -140,4 +132,3 @@ func (v *AuthVerifier) verifyBasic(r *http.Request) bool { return subtle.ConstantTimeCompare([]byte(password), []byte(v.config.Secret)) == 1 } -} diff --git a/service/internal/webhooks/matcher.go b/service/internal/webhooks/matcher.go index 8b43165..dbea358 100644 --- a/service/internal/webhooks/matcher.go +++ b/service/internal/webhooks/matcher.go @@ -19,7 +19,6 @@ func NewWebhookMatcher(cfg config.WebhookConfig, r *http.Request, bodyBytes []by return &WebhookMatcher{ config: cfg, req: r, - body: body, bodyBytes: bodyBytes, } }