Skip to content

Commit 73e99f4

Browse files
committed
allow optional secret verification
1 parent f66aed3 commit 73e99f4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

internal/app/controller/bitbucket_server_listener.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func BitbucketServerListener(c *gin.Context, messages chan<- string) {
3838

3939
ok := parser.VerifySignature(viper.GetString("integrations.bitbucket_server.webhook_secret"))
4040

41-
if !ok {
41+
if !ok && viper.GetString("integrations.bitbucket_server.webhook_secret") != "" {
4242
c.JSON(http.StatusForbidden, gin.H{
4343
"status": "Oops!",
4444
})

internal/app/controller/github_listener.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func GithubListener(c *gin.Context, messages chan<- string) {
4141
ok := parser.VerifySignature(viper.GetString("integrations.github.webhook_secret"))
4242
eventName := parser.GetGitHubEvent()
4343

44-
if !ok {
44+
if !ok && viper.GetString("integrations.github.webhook_secret") != "" {
4545
c.JSON(http.StatusForbidden, gin.H{
4646
"status": "Oops!",
4747
})

0 commit comments

Comments
 (0)