You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
forgejo/services/webhook
zeripath d6fa138e7c
Only send webhook events to active system webhooks and only deliver to active hooks (#19234)
There is a bug in the system webhooks whereby the active state is not checked when
webhooks are prepared and there is a bug that deactivating webhooks do not prevent
queued deliveries.

* Only add SystemWebhooks to the prepareWebhooks list if they are active
* At the time of delivery if the underlying webhook is not active mark it
as "delivered" but with a failed delivery so it does not get delivered.

Fix #19220

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2 years ago
..
deliver.go Only send webhook events to active system webhooks and only deliver to active hooks (#19234) 2 years ago
deliver_test.go format with gofumpt (#18184) 2 years ago
dingtalk.go format with gofumpt (#18184) 2 years ago
dingtalk_test.go Move webhook into models/webhook/ (#17579) 3 years ago
discord.go format with gofumpt (#18184) 2 years ago
discord_test.go Move webhook into models/webhook/ (#17579) 3 years ago
feishu.go format with gofumpt (#18184) 2 years ago
feishu_test.go Move webhook into models/webhook/ (#17579) 3 years ago
general.go Simplify parameter types (#18006) 3 years ago
general_test.go Add tests for all webhooks (#16214) 3 years ago
main_test.go Add missing `X-Total-Count` and fix some related bugs (#17968) 3 years ago
matrix.go format with gofumpt (#18184) 2 years ago
matrix_test.go Move webhook into models/webhook/ (#17579) 3 years ago
msteams.go format with gofumpt (#18184) 2 years ago
msteams_test.go Move webhook into models/webhook/ (#17579) 3 years ago
packagist.go Add packagist webhook (#18224) 2 years ago
packagist_test.go Add packagist webhook (#18224) 2 years ago
payloader.go Move webhook into models/webhook/ (#17579) 3 years ago
slack.go format with gofumpt (#18184) 2 years ago
slack_test.go Move webhook into models/webhook/ (#17579) 3 years ago
telegram.go format with gofumpt (#18184) 2 years ago
telegram_test.go Move webhook into models/webhook/ (#17579) 3 years ago
webhook.go Only send webhook events to active system webhooks and only deliver to active hooks (#19234) 2 years ago
webhook_test.go Move repository model into models/repo (#17933) 3 years ago
wechatwork.go format with gofumpt (#18184) 2 years ago