open-webui/backend/open_webui/routers
Classic298 707efeaed7
fix: scope knowledge sync cleanup deletions to the target knowledge base (#26722)
POST /knowledge/{id}/sync/cleanup verified write access to the knowledge base in the URL but then acted on the caller-supplied file_ids and dir_ids without checking they belong to that knowledge base. A user with write access to any knowledge base could pass another knowledge base's directory id to delete its directory subtree and knowledge_file associations, or another file's id to drop its file-{file_id} vector collection. Fetch each directory and skip any whose knowledge_id does not match the URL id (matching the explicit directory-delete endpoint), and gate the per-file vector cleanup on Knowledges.has_file(id, file_id) so a foreign file id cannot trigger collection deletion. Legitimate same-knowledge-base cleanup is unchanged.

Co-authored-by: whyiug <whyiug@users.noreply.github.com>
2026-07-27 02:18:38 -04:00
..
analytics.py refac 2026-06-29 01:38:41 -05:00
audio.py fix: preserve chunk order when assembling multi-chunk transcriptions (#27417) 2026-07-26 18:55:52 -04:00
auths.py feat: add a master OAuth / OIDC enable toggle in Authentication settings (#26988) 2026-07-26 18:43:21 -04:00
automations.py refac 2026-07-26 19:34:41 -04:00
calendar.py refac 2026-06-29 13:03:14 -05:00
channels.py fix: require message authorship for standard-channel message edit and delete (#27197) 2026-07-23 23:40:03 -04:00
chats.py chore: format 2026-07-27 00:12:47 -04:00
configs.py fix: resolve MCP OAuth authorize_url discovery and fail clearly (#26647) (#26654) 2026-07-27 02:15:28 -04:00
evaluations.py refac 2026-07-24 02:36:10 -04:00
files.py chore: format 2026-07-20 22:11:42 -04:00
folders.py fix: restrict folder deletion to the owner or an admin (#27003) 2026-07-27 01:46:58 -04:00
functions.py refac 2026-07-26 19:10:41 -04:00
groups.py refac 2026-06-29 05:47:21 -05:00
images.py refac 2026-07-23 21:29:33 -04:00
knowledge.py fix: scope knowledge sync cleanup deletions to the target knowledge base (#26722) 2026-07-27 02:18:38 -04:00
memories.py refac 2026-07-27 01:59:17 -04:00
models.py fix: strip model params for read-only callers in the model list endpoint (#27004) 2026-07-27 01:51:29 -04:00
notes.py chore: format 2026-07-20 22:11:42 -04:00
notifications.py refac 2026-07-16 01:27:52 -04:00
ollama.py perf: stream pure passthrough proxy responses by network chunk instead of by line (#27384) 2026-07-27 00:58:24 -04:00
openai.py perf: stream pure passthrough proxy responses by network chunk instead of by line (#27384) 2026-07-27 00:58:24 -04:00
pipelines.py refac 2026-07-23 21:29:33 -04:00
prompts.py refac 2026-06-29 13:03:14 -05:00
retrieval.py refac: owner-bind ephemeral web-search RAG collections (#26706) 2026-07-27 02:08:04 -04:00
scim.py refac 2026-06-25 03:31:45 +01:00
skills.py refac 2026-07-17 04:11:11 -04:00
tasks.py refac 2026-07-16 21:57:43 -04:00
terminals.py fix: resolve terminal system_oauth token server-side instead of trusting a client header (#26719) 2026-07-27 02:07:34 -04:00
tools.py fix: do not expose tool source code to read-only users (#27005) 2026-07-27 01:51:01 -04:00
users.py refac 2026-07-24 01:44:30 -04:00
utils.py refac 2026-06-17 02:52:35 +02:00