fix(web_fetch): use ValidateURLForSSRF instead of removed IsSSRFSafeURL

This commit is contained in:
nullkey
2026-03-31 21:35:48 +08:00
committed by lyingbug
parent 1151d90bb9
commit 6eafde98a3
+2 -2
View File
@@ -31,8 +31,8 @@ func FetchURLContent(ctx context.Context, rawURL string) (string, error) {
} }
// SSRF validation // SSRF validation
if safe, reason := utils.IsSSRFSafeURL(rawURL); !safe { if err := utils.ValidateURLForSSRF(rawURL); err != nil {
return "", fmt.Errorf("URL rejected: %s", reason) return "", fmt.Errorf("URL rejected: %w", err)
} }
u, err := url.Parse(rawURL) u, err := url.Parse(rawURL)