Files
open-webui/backend/open_webui/models
Classic298 3f1c52e018 fix: gate chat-file links by caller access + repair insert_chat_files db arg (#25054)
insert_chat_files() stored any caller-supplied file_id with no ownership
check, so a user could attach another user's file to their own chat and
then read it through the shared-chat access path in has_access_to_file().
Filter file_ids to those the caller owns, is admin for, or can read.

Also repairs an UnboundLocalError introduced in 260ead64d: the existing
duplicate-check referenced `session` before it was assigned (db=session),
so the function threw on every call and no chat_file rows were persisted.
2026-05-28 17:42:17 -05:00
..
2026-05-21 15:29:49 +04:00
2026-05-19 20:37:53 +04:00
2026-05-21 15:29:49 +04:00
2026-05-21 15:29:49 +04:00
2026-05-28 17:24:33 -05:00
2026-05-21 15:29:49 +04:00
2026-05-14 01:49:34 +09:00
2026-05-21 15:29:49 +04:00
2026-05-21 15:29:49 +04:00
2026-05-21 15:29:49 +04:00