mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 11:28:35 -05:00
[PR #23627] [CLOSED] fix: enforce access checks on RAG vector search collection queries #50334
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/23627
Author: @Classic298
Created: 4/12/2026
Status: ❌ Closed
Base:
dev← Head:fix/rag-collection-access-check📝 Commits (3)
d6062c7fix: enforce access checks on RAG vector search collection queriese1b08c2Merge remote-tracking branch 'origin/dev' into fix/rag-collection-access-checkc4dcb7cchore: adapt _has_access_to_collection to upstream async DB migration📊 Changes
1 file changed (+92 additions, -11 deletions)
View changed files
📝
backend/open_webui/retrieval/utils.py(+92 -11)📄 Description
The non-full-context file path, text collection_name path, and bare collection_name/collection_names fallback all queried the vector store without verifying the user has read access to the underlying file or knowledge base.
Adds _has_access_to_collection helper that resolves collection name format (file-, knowledge UUID, legacy bare ID) to the underlying resource and verifies ownership or access grants. All three unprotected paths now gate on this check before querying.
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.