From 2af4c4b3c73d4561bdc6235dcd668c58f4534420 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Tue, 18 Nov 2025 04:42:09 -0500 Subject: [PATCH] refac --- backend/open_webui/retrieval/web/utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/open_webui/retrieval/web/utils.py b/backend/open_webui/retrieval/web/utils.py index df5036487c..127c703442 100644 --- a/backend/open_webui/retrieval/web/utils.py +++ b/backend/open_webui/retrieval/web/utils.py @@ -108,8 +108,7 @@ def validate_url(url: Union[str, Sequence[str]]): # Blocklist check using unified filtering logic if WEB_FETCH_FILTER_LIST: - result = is_string_allowed(url, WEB_FETCH_FILTER_LIST) - if len(result) == 0: + if not is_string_allowed(url, WEB_FETCH_FILTER_LIST): log.warning(f"URL blocked by filter list: {url}") raise ValueError(ERROR_MESSAGES.INVALID_URL)