Skip to content

Commit

Permalink
Merge pull request #43 from go-playground/bb-uuid-check-enhancement
Browse files Browse the repository at this point in the history
only validate UUID header when expecting one
  • Loading branch information
Dean Karn authored Aug 9, 2018
2 parents 206a8b4 + f583341 commit a610eb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bitbucket/bitbucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit a610eb2

Please sign in to comment.