From ce2649501a6e0968c8e2f8041beb2117c53a2c7b Mon Sep 17 00:00:00 2001 From: Secriy Date: Sat, 7 Dec 2024 01:27:54 +0800 Subject: [PATCH] fix: escape URL path to prevent issues with unescaped characters --- config/webhook.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/webhook.go b/config/webhook.go index e69f16276..1af51a204 100644 --- a/config/webhook.go +++ b/config/webhook.go @@ -74,7 +74,7 @@ func ExecWebhook(domains *Domains, conf *Config) (v4Status updateStatusType, v6S util.Log("Webhook配置中的URL不正确") return } - req, err := http.NewRequest(method, fmt.Sprintf("%s://%s%s?%s", u.Scheme, u.Host, u.Path, u.Query().Encode()), strings.NewReader(postPara)) + req, err := http.NewRequest(method, fmt.Sprintf("%s://%s%s?%s", u.Scheme, u.Host, u.EscapedPath(), u.Query().Encode()), strings.NewReader(postPara)) if err != nil { util.Log("Webhook调用失败! 异常信息:%s", err) return