-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[Telegram] Webhook "Active" flag ignored #19220
Comments
Is this a system webhook or a repository webhook? |
…o active hooks 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>
I've noticed a few bugs - which assuming that these represent your problems then should they should fix the problem. |
Thank you a lot Zeripath!!
Sorry for the missing information, it was a system-wide wehbook that sent a Telegram notification whenever action X happened on the Gitea server. Would it be possible to take a look at why it sends webooks even for private repos too? Or is it "normal" behavior? |
A system webhook runs on every webhook - that is why it is a system webhook. |
…o 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>
…o active hooks (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>
…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>
…o active hooks (#19234) (#19248) 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>
Description
I noticed that after configuring a Telegram webhook, new repos in a private org trigger the webhook too, even private repos themselves (but this is a separate issue).
I then disabled the webhook by unflagging the "Active" section in the webhook settings, tho it still sends out Telegram messages via the bot.
In the logs I flag the webhook enabled, save the webhook configuration, disable it again and save it again, create a test repository, and finally delete it.
Gitea Version
1.16.5
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
https://gist.github.com/bryanpedini/3f191cf3b8ae706541f511e809961282
Screenshots
N/A
Git Version
2.20.1
Operating System
Debian 10 + official Docker image
How are you running Gitea?
Docker Compose stack: deployments/gitea
Database
MySQL
The text was updated successfully, but these errors were encountered: