From 64378759798f4cbb2c65f719b0fb14ba59c324cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Wed, 25 Aug 2021 17:32:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96ACME=E8=AF=BB=E5=8F=96?= =?UTF-8?q?=E9=80=9F=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/nodes/http_request_acme.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/nodes/http_request_acme.go b/internal/nodes/http_request_acme.go index 0430d88..8e22535 100644 --- a/internal/nodes/http_request_acme.go +++ b/internal/nodes/http_request_acme.go @@ -12,6 +12,10 @@ func (this *HTTPRequest) doACME() { // TODO 对请求进行校验,防止恶意攻击 token := filepath.Base(this.RawReq.URL.Path) + if token == "acme-challenge" || len(token) <= 32 { + this.writer.WriteHeader(http.StatusNotFound) + return + } rpcClient, err := rpc.SharedRPC() if err != nil {