From 6f55514c5c3f770b956ba9d7f71b7496bb469f81 Mon Sep 17 00:00:00 2001 From: G30 <50341825+silentoplayz@users.noreply.github.com> Date: Sat, 12 Sep 2026 17:56:16 -0400 Subject: [PATCH] fix: let validate_url accept dotless hosts when local web fetch is enabled (#29945) --- backend/open_webui/retrieval/web/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/open_webui/retrieval/web/utils.py b/backend/open_webui/retrieval/web/utils.py index 1605e65b3c..c9509edc87 100644 --- a/backend/open_webui/retrieval/web/utils.py +++ b/backend/open_webui/retrieval/web/utils.py @@ -130,7 +130,7 @@ def _assert_addresses_allowed(addresses: Sequence[str]) -> None: def validate_url(url: Union[str, Sequence[str]]): if isinstance(url, str): - if isinstance(validators.url(url), validators.ValidationError): + if isinstance(validators.url(url, simple_host=ENABLE_LOCAL_WEB_FETCH), validators.ValidationError): raise ValueError(ERROR_MESSAGES.INVALID_URL) # Reject parser-confusing chars: urlparse and requests/aiohttp split