open-webui/backend
goecho 74f91bc74d Fix bug: Header attributes (Host, Authorization, Origin, Referer) not sanitized
- Resolved an issue where header attributes Host, Authorization, Origin, and Referer were not being sanitized, resulting in two major issues:
  1. Ollama requests inadvertently exposed user information, leading to data leakage.
  2. When Ollama is deployed on different servers, and the intermediary proxy layer uses the host header to locate downstream services, it fails to find them.

Root Cause:
- In FastAPI, when accessing request.headers, all header names are converted to lowercase. This is because FastAPI, and its underlying framework Starlette, adhere to the HTTP/2 standard, which mandates lowercase header field names for performance and consistency.
- In HTTP/2, enforcing lowercase header field names reduces complexity in header processing as case sensitivity is no longer a concern. Thus, regardless of the case used in client-sent header fields, the server processes them uniformly in lowercase.
- This practice is adopted in FastAPI and other modern HTTP frameworks, even in an HTTP/1.1 context, to maintain consistency with HTTP/2 and improve overall performance. As a result, header field names are always presented in lowercase in FastAPI, even if the original request used capitalization or mixed case.
2024-01-11 14:36:34 +08:00
..
apps Fix bug: Header attributes (Host, Authorization, Origin, Referer) not sanitized 2024-01-11 14:36:34 +08:00
data fix: docker container volume mount location 2023-12-27 00:11:23 -08:00
utils chore: disable passlib log 2024-01-05 12:22:27 -08:00
.dockerignore chore: dockerignore added 2023-12-26 02:22:06 -08:00
.gitignore feat: chromadb vector store api 2024-01-06 22:59:22 -08:00
config.py feat: documents 2024-01-07 22:14:08 -08:00
constants.py feat: doc upload error handling 2024-01-08 01:54:03 -08:00
dev.sh fix: https connection issue 2023-12-28 09:52:30 -08:00
main.py fix: disable swagger doc in prod 2024-01-07 02:48:21 -08:00
requirements.txt Update requirements.txt 2024-01-09 21:09:28 -08:00
start.sh fix: 🔨 start script permissions & environment 2024-01-03 15:56:11 -08:00