From ea837b6b9467b4d1ae8153f6685ff2ade274f12f Mon Sep 17 00:00:00 2001 From: Wonder Date: Mon, 13 Oct 2025 14:07:39 +0800 Subject: [PATCH] =?UTF-8?q?=20=F0=9F=90=9BFix:=20Secret=20=E5=B7=B2?= =?UTF-8?q?=E8=A2=AB=E5=BC=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/cn/hezhaohui/webhook/constant/Payload.java | 7 ------- .../cn/hezhaohui/webhook/controller/HookController.java | 5 ----- 2 files changed, 12 deletions(-) delete mode 100644 gitea-webhook/src/main/java/cn/hezhaohui/webhook/constant/Payload.java diff --git a/gitea-webhook/src/main/java/cn/hezhaohui/webhook/constant/Payload.java b/gitea-webhook/src/main/java/cn/hezhaohui/webhook/constant/Payload.java deleted file mode 100644 index 497a1eb..0000000 --- a/gitea-webhook/src/main/java/cn/hezhaohui/webhook/constant/Payload.java +++ /dev/null @@ -1,7 +0,0 @@ -package cn.hezhaohui.webhook.constant; - - - -public class Payload { - public final static String SECRET = "dn293830"; -} diff --git a/gitea-webhook/src/main/java/cn/hezhaohui/webhook/controller/HookController.java b/gitea-webhook/src/main/java/cn/hezhaohui/webhook/controller/HookController.java index ef48d33..ce1b36e 100644 --- a/gitea-webhook/src/main/java/cn/hezhaohui/webhook/controller/HookController.java +++ b/gitea-webhook/src/main/java/cn/hezhaohui/webhook/controller/HookController.java @@ -9,7 +9,6 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import static cn.hezhaohui.webhook.constant.Payload.SECRET; @RestController @RequestMapping("/hook") @@ -23,10 +22,6 @@ public class HookController { public void handlePush(@RequestBody GiteaPushEvent event) { log.info(event.toString()); - if(!SECRET.equals(event.getSecret())) { - return; - } - hookService.handlePush(event); } }