Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only send webhook events to active system webhooks and only deliver to active hooks (#19234) #19248

Merged
merged 3 commits into from
Mar 29, 2022

Conversation

zeripath
Copy link
Contributor

Backport #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

…o active hooks (go-gitea#19234)

Backport go-gitea#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 go-gitea#19220

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

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Mar 29, 2022
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Mar 29, 2022
@6543
Copy link
Member

6543 commented Mar 29, 2022

.

@6543 6543 merged commit e9935d3 into go-gitea:release/v1.16 Mar 29, 2022
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
@zeripath zeripath deleted the backport-19234-v1.16 branch December 29, 2022 19:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/webhooks type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants