Skip to content

Commit

Permalink
fix: escape URL path to prevent issues with unescaped characters (#1334)
Browse files Browse the repository at this point in the history
  • Loading branch information
secriy authored Dec 7, 2024
1 parent a8ea30c commit e0dc641
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e0dc641

Please sign in to comment.