Skip to content

Commit

Permalink
Add a log message when the signature don't match.
Browse files Browse the repository at this point in the history
  • Loading branch information
francois2metz committed Mar 5, 2017
1 parent b57ae0d commit 68d6d6d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions plugins/inputs/webhooks/github/github_webhooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func (gh *GithubWebhook) eventHandler(w http.ResponseWriter, r *http.Request) {
}

if gh.Secret != "" && !checkSignature(gh.Secret, data, r.Header["X-Hub-Signature"][0]) {
log.Printf("I! Fail to check the github webhook signature\n")
w.WriteHeader(http.StatusBadRequest)
return
}
Expand Down

0 comments on commit 68d6d6d

Please sign in to comment.