Skip to content

Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.

fix(web_fetch): use ValidateURLForSSRF instead of removed IsSSRFSafeURL

nullkey6eafde98a315
diff --git a/internal/infrastructure/web_fetch/fetcher.go b/internal/infrastructure/web_fetch/fetcher.go
index 22ae6f594..96e5764da 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)