From 6eafde98a3152cc01fcf90b9dde9d7f8dfe5738a Mon Sep 17 00:00:00 2001 From: nullkey Date: Tue, 31 Mar 2026 21:35:48 +0800 Subject: [PATCH] fix(web_fetch): use ValidateURLForSSRF instead of removed IsSSRFSafeURL --- internal/infrastructure/web_fetch/fetcher.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/infrastructure/web_fetch/fetcher.go b/internal/infrastructure/web_fetch/fetcher.go index 22ae6f59..96e5764d 100644 --- a/internal/infrastructure/web_fetch/fetcher.go +++ b/internal/infrastructure/web_fetch/fetcher.go @@ -31,8 +31,8 @@ func FetchURLContent(ctx context.Context, rawURL string) (string, error) { } // SSRF validation - if safe, reason := utils.IsSSRFSafeURL(rawURL); !safe { - return "", fmt.Errorf("URL rejected: %s", reason) + if err := utils.ValidateURLForSSRF(rawURL); err != nil { + return "", fmt.Errorf("URL rejected: %w", err) } u, err := url.Parse(rawURL)