bug: uploaded files leaking to other user chats #1774

Closed
opened 2025-11-11 14:52:51 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @dartcrossett on GitHub (Aug 14, 2024).

Originally assigned to: @tjbck on GitHub.

Bug Report

Installation Method

Using the docker image deployed to a kubernetes environment in a multi-user environment.

Environment

  • Open WebUI Version: v0.3.12

  • Ollama (if applicable): N/A

  • Operating System: All

  • Browser (if applicable): All

Confirmation:

  • [+] I have read and followed all the instructions provided in the README.md.
  • [+] I am on the latest version of both Open WebUI and Ollama.
  • [+] I have included the browser console logs.
  • I have included the Docker container logs.
  • [+] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Expected Behavior:

When I attach a file to a chat (Upload File) and Open WebUI can't extract text from the file, it should not include any file in the chat session.

Actual Behavior:

When I attach a file (ex Word Doc, PDF without text) and Open WebUI can't extract any contents, I get the following error and if I submit the message to the LLM, the last successfully uploaded file by any user is used instead and is returned the Chat UI.

Something went wrong :/ 500: The content provided is empty. Please ensure that there is text or data present before proceeding.

Description

Bug Summary:
The ChatUI is leaking files uploaded by other users available when an empty document is uploaded.

Reproduction Details

Steps to Reproduce:

  1. Create a Word Document with some text in it
  2. Create another Word Document with nothing in it
  3. As User1, Upload the document with text in it to the chat UI and ask a questions about it
  4. As User2, Upload the empty document to the chat UI and ask a question about it.

User2's session will return the document from User1.

Logs and Screenshots

Browser Console Logs:
1723661049293.log

Docker Container Logs:
[Include relevant Docker container logs, if applicable]

Screenshots/Screen Recordings (if applicable):

INFO:     10.231.35.65:0 - "POST /api/v1/files/ HTTP/1.1" 200 OK
ERROR [apps.rag.main] 500: The content provided is empty. Please ensure that there is text or data present before proceeding.
Traceback (most recent call last):
  File "/app/backend/apps/rag/main.py", line 1251, in process_doc
    result = store_data_in_vector_db(
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/apps/rag/main.py", line 949, in store_data_in_vector_db
    raise ValueError(ERROR_MESSAGES.EMPTY_CONTENT)
ValueError: The content provided is empty. Please ensure that there is text or data present before proceeding.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/backend/apps/rag/main.py", line 1268, in process_doc
    raise HTTPException(
fastapi.exceptions.HTTPException: 500: The content provided is empty. Please ensure that there is text or data present before proceeding.
INFO:     10.231.35.65:0 - "POST /rag/api/v1/process/doc HTTP/1.1" 400 Bad Request
INFO:     10.231.35.65:0 - "GET /static/favicon.png HTTP/1.1" 200 OK
INFO:     10.231.35.65:0 - "POST /api/v1/chats/new HTTP/1.1" 200 OK
INFO:     10.231.35.65:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK
INFO:     10.231.35.65:0 - "GET /static/favicon.png HTTP/1.1" 200 OK
WARNI [chromadb.segment.impl.vector.local_persistent_hnsw] Number of requested results 5 is greater than number of elements in index 1, updating n_results = 1
INFO  [apps.rag.utils] query_doc:result {'ids': [['3ec10ae6-2377-4eec-bf9d-e83d0a02903e']], 'distances': [[1.6665424719087232]], 'metadatas': [[{'file_id': '75c5a46d-60c5-4bb7-a2c0-573bb7d2fd2c', 'name': 'with_contents.docx', 'source': '/app/backend/data/uploads/75c5a46d-60c5-4bb7-a2c0-573bb7d2fd2c_with_contents.docx', 'start_index': 0}]], 'embeddings': None, 'documents': [['This is file one!']], 'uris': None, 'data': None, 'included': ['metadatas', 'documents', 'distances']}
INFO:     10.231.35.65:0 - "POST /api/chat/completions HTTP/1.1" 200 OK

Additional Information

issue

Originally created by @dartcrossett on GitHub (Aug 14, 2024). Originally assigned to: @tjbck on GitHub. # Bug Report ## Installation Method Using the docker image deployed to a kubernetes environment in a multi-user environment. ## Environment - **Open WebUI Version:** v0.3.12 - **Ollama (if applicable):** N/A - **Operating System:** All - **Browser (if applicable):** All **Confirmation:** - [+] I have read and followed all the instructions provided in the README.md. - [+] I am on the latest version of both Open WebUI and Ollama. - [+] I have included the browser console logs. - [x] I have included the Docker container logs. - [+] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Expected Behavior: When I attach a file to a chat (Upload File) and Open WebUI can't extract text from the file, it should not include any file in the chat session. ## Actual Behavior: When I attach a file (ex Word Doc, PDF without text) and Open WebUI can't extract any contents, I get the following error and if I submit the message to the LLM, the last successfully uploaded file by any user is used instead and is returned the Chat UI. ``` Something went wrong :/ 500: The content provided is empty. Please ensure that there is text or data present before proceeding. ``` ## Description **Bug Summary:** The ChatUI is leaking files uploaded by other users available when an empty document is uploaded. ## Reproduction Details **Steps to Reproduce:** 1. Create a Word Document with some text in it 2. Create another Word Document with nothing in it 3. As User1, Upload the document with text in it to the chat UI and ask a questions about it 4. As User2, Upload the empty document to the chat UI and ask a question about it. User2's session will return the document from User1. ## Logs and Screenshots **Browser Console Logs:** [1723661049293.log](https://github.com/user-attachments/files/16617602/1723661049293.log) **Docker Container Logs:** [Include relevant Docker container logs, if applicable] **Screenshots/Screen Recordings (if applicable):** ``` INFO: 10.231.35.65:0 - "POST /api/v1/files/ HTTP/1.1" 200 OK ERROR [apps.rag.main] 500: The content provided is empty. Please ensure that there is text or data present before proceeding. Traceback (most recent call last): File "/app/backend/apps/rag/main.py", line 1251, in process_doc result = store_data_in_vector_db( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/apps/rag/main.py", line 949, in store_data_in_vector_db raise ValueError(ERROR_MESSAGES.EMPTY_CONTENT) ValueError: The content provided is empty. Please ensure that there is text or data present before proceeding. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/app/backend/apps/rag/main.py", line 1268, in process_doc raise HTTPException( fastapi.exceptions.HTTPException: 500: The content provided is empty. Please ensure that there is text or data present before proceeding. INFO: 10.231.35.65:0 - "POST /rag/api/v1/process/doc HTTP/1.1" 400 Bad Request INFO: 10.231.35.65:0 - "GET /static/favicon.png HTTP/1.1" 200 OK INFO: 10.231.35.65:0 - "POST /api/v1/chats/new HTTP/1.1" 200 OK INFO: 10.231.35.65:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK INFO: 10.231.35.65:0 - "GET /static/favicon.png HTTP/1.1" 200 OK WARNI [chromadb.segment.impl.vector.local_persistent_hnsw] Number of requested results 5 is greater than number of elements in index 1, updating n_results = 1 INFO [apps.rag.utils] query_doc:result {'ids': [['3ec10ae6-2377-4eec-bf9d-e83d0a02903e']], 'distances': [[1.6665424719087232]], 'metadatas': [[{'file_id': '75c5a46d-60c5-4bb7-a2c0-573bb7d2fd2c', 'name': 'with_contents.docx', 'source': '/app/backend/data/uploads/75c5a46d-60c5-4bb7-a2c0-573bb7d2fd2c_with_contents.docx', 'start_index': 0}]], 'embeddings': None, 'documents': [['This is file one!']], 'uris': None, 'data': None, 'included': ['metadatas', 'documents', 'distances']} INFO: 10.231.35.65:0 - "POST /api/chat/completions HTTP/1.1" 200 OK ``` ## Additional Information ![issue](https://github.com/user-attachments/assets/7b7bfb96-88a6-40b8-b2dd-cd7834c2060a)
Author
Owner

@mootfrost commented on GitHub (Aug 16, 2024):

still present in 0.3.13

@mootfrost commented on GitHub (Aug 16, 2024): still present in 0.3.13
Author
Owner

@portillof commented on GitHub (Aug 22, 2024):

@portillof commented on GitHub (Aug 22, 2024): ➕
Author
Owner

@TheMasterFX commented on GitHub (Aug 23, 2024):

I also observed this behavior but the User 2 didn't even upload any file 😱

@TheMasterFX commented on GitHub (Aug 23, 2024): I also observed this behavior but the User 2 didn't even upload any file 😱
Author
Owner

@tjbck commented on GitHub (Aug 23, 2024):

Fixed on dev.

@tjbck commented on GitHub (Aug 23, 2024): Fixed on dev.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#1774