You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Signed Bitbucket webhooks are rejected: handler reads X-Hub-Signature-256, Bitbucket sends X-Hub-Signature #94
The Bitbucket handler (api/server.py#L509-L517) verifies X-Hub-Signature-256 or X-Webhook-Signature. Bitbucket Cloud webhooks with a secret send the HMAC in X-Hub-Signature (sha256=<hex>). When WEBHOOK_SECRET is set, genuine Bitbucket deliveries therefore have no signature header the handler reads, and they fail with 401.
The tests send X-Hub-Signature-256, so they don't catch this.
Suggested fix
Also read X-Hub-Signature in bitbucket_webhook (and make sure it's sha256=-prefixed before verifying).
Add a test with a payload signed the way Bitbucket signs it.
Document the Bitbucket webhook secret setup in docs/MULTI_PLATFORM_GUIDE.md.
Activity