Forgejo webhook deliveries are all rejected (invalid signature) #31
Labels
No labels
breaking
bug
ci
dependencies
documentation
feature
security
skip-changelog
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
thierryade/backend#31
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Every delivery to
/api/webhooks/forgejo/issues/<repo>/is refused with 403 « missing or invalid signature » (seen in prod on Filao/backend, Filao/frontend-app, Filao/frontend-web since their hooks were registered on 2026-11-01). So aSpec: CODEline in a new issue never creates a link, and state changes only arrive through the 15-minute poll.Cause:
apps.specs.forgejo.ensure_webhooksends the secret as a top-level"secret"of the create-hook payload. Forgejo only reads it fromconfig["secret"]and ignores the top-level key, so the hook has no secret and the HMAC never matchesForgejoRepoWebhook.secret(the unverified point noted on #28).Fix:
config;resend_forgejo_webhooksmanagement command that re-sends each registered hook's config (URL + secret), to repair the hooks already registered.