mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 03:18:23 -05:00
[PR #14649] [CLOSED] Auth cache #39168
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/14649
Author: @rragundez
Created: 6/4/2025
Status: ❌ Closed
Base:
dev← Head:auth-cache📝 Commits (2)
3f6cf7cRemove extension from images and add user.id in path1ad263bAdd protected endpoint for /cache📊 Changes
2 files changed (+21 additions, -7 deletions)
View changed files
📝
backend/open_webui/main.py(+14 -2)📝
backend/open_webui/utils/middleware.py(+7 -5)📄 Description
Pull Request Checklist
The /cache endpoint is unprotected and any file that is created in that directory will automatically be available without any auth.
This PR adds protection over this endpoint to be available only to users of the app but also to only the user specific that created the image.
In addition it is recommended to remove the extension of the file being written as load balancer and similar systems could activate cache if the extension is kept as it is identified as a file, and if cache is activated then it defeats the purpose of authentication as it will serve the file directly without triggering the logic of the endpoint.
For now the only place I see it being used is for the images, which I already patched in this PR.
I tested but Please test from your side.
devbranch.Changelog Entry
Description
Added
Changed
Deprecated
Removed
Fixed
Security
Breaking Changes
Additional Information
Screenshots or Videos
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.