mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[PR #23452] [CLOSED] fix: enforce default-deny access control in _validate_collection_access #50249
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/23452
Author: @Classic298
Created: 4/6/2026
Status: ❌ Closed
Base:
dev← Head:fix/validate-collection-access-default-deny📝 Commits (1)
9c71abbfix: enforce default-deny access control in _validate_collection_access📊 Changes
2 files changed (+86 additions, -6 deletions)
View changed files
📝
backend/open_webui/models/knowledge.py(+11 -0)📝
backend/open_webui/routers/retrieval.py(+75 -6)📄 Description
Block non-admin users from querying the knowledge-bases system collection and arbitrary knowledge base document collections via the retrieval API.
The function previously only guarded user-memory-* and file-* prefixes, letting all other collection names (including the knowledge-bases metadata collection and per-KB UUID collections) pass through unchecked.
Now uses a default-deny approach:
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.