auto-sync: 2026-06-08 08:03:50
Deploy / ci (push) Waiting to run
Deploy / deploy (push) Blocked by required conditions
Deploy / notify-deploy-failure (push) Blocked by required conditions

This commit is contained in:
cfdaily
2026-06-08 08:03:50 +08:00
parent 009184a28e
commit 900a38524f
+1 -4
View File
@@ -426,10 +426,7 @@ async def gitea_webhook(
# 1. 签名验证
if not _verify_signature(body, x_gitea_signature):
logger.warning("Webhook signature verification failed (has_sig=%s, sig=%s, expected=%s)",
bool(x_gitea_signature),
x_gitea_signature[:16] if x_gitea_signature else "none",
hmac.new(_WEBHOOK_SECRET.encode(), body, hashlib.sha256).hexdigest()[:16])
logger.warning("Webhook signature verification failed")
return Response(status_code=403, content="signature verification failed")
# 2. 幂等检查