mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 06:03:26 -05:00
[PR #22109] [MERGED] fix: enforce ownership check on user-memory collection queries #26492
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/22109
Author: @Classic298
Created: 3/1/2026
Status: ✅ Merged
Merged: 3/1/2026
Merged by: @tjbck
Base:
dev← Head:fix/memory-collection-access-check📝 Commits (5)
f233bf2fix: enforce ownership check on user-memory collection queries4a2ed90Merge branch 'dev' into fix/memory-collection-access-checkcf2f797Update retrieval.pydf6e0e2Merge branch 'fix/memory-collection-access-check' of https://github.com/Classic298/open-webui into fix/memory-collection-access-check41b7bc8Update retrieval.py📊 Changes
1 file changed (+31 additions, -21 deletions)
View changed files
📝
backend/open_webui/routers/retrieval.py(+31 -21)📄 Description
fix: enforce ownership check on user-memory collection queries
Prevent authenticated users from querying other users' memory collections via the /query/doc and /query/collection endpoints. A new _validate_collection_access helper rejects requests for user-memory-{UUID} collections where the UUID does not match the requesting user. Admins bypass the check.
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.