From f583341fb88905392d084ea60dfa35dadf5bb2f3 Mon Sep 17 00:00:00 2001 From: Dean Karn Date: Thu, 9 Aug 2018 12:26:52 -0700 Subject: [PATCH] only validate UUID header when expecting one --- bitbucket/bitbucket.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitbucket/bitbucket.go b/bitbucket/bitbucket.go index 54bbb22..2d1344e 100644 --- a/bitbucket/bitbucket.go +++ b/bitbucket/bitbucket.go @@ -93,7 +93,7 @@ func (hook Webhook) Parse(r *http.Request, events ...Event) (interface{}, error) } uuid := r.Header.Get("X-Hook-UUID") - if uuid == "" { + if hook.uuid != "" && uuid == "" { return nil, ErrMissingHookUUIDHeader }