auto-sync: 2026-06-07 11:32:20
This commit is contained in:
@@ -1713,7 +1713,7 @@ async def handle_gitea_webhook(
|
||||
|
||||
body = await request.body()
|
||||
|
||||
# 1. 签名验证(可选)
|
||||
# 1. 签名验证(可选,假设 Gitea 使用 HMAC-SHA256,需根据 Gitea 版本确认)
|
||||
if GITEA_WEBHOOK_SECRET:
|
||||
expected = hmac.new(GITEA_WEBHOOK_SECRET.encode(), body, sha256).hexdigest()
|
||||
if not hmac.compare_digest(expected, (x_gitea_signature or "")):
|
||||
|
||||
Reference in New Issue
Block a user