auto-sync: 2026-06-08 07:32:38
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 07:32:38 +08:00
parent 67332422ec
commit 6dc029ad54
+4 -1
View File
@@ -426,7 +426,10 @@ async def gitea_webhook(
# 1. 签名验证
if not _verify_signature(body, x_gitea_signature):
logger.warning("Webhook signature verification failed")
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])
return Response(status_code=403, content="signature verification failed")
# 2. 幂等检查