mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-30 17:25:30 -05:00
[PR #24674] [CLOSED] fix(images): add null-check in upload_image to prevent crash on SSRF block #115082
Reference in New Issue
Block a user
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/24674
Author: @mturac
Created: 5/13/2026
Status: ❌ Closed
Base:
dev← Head:fix/comfyui-clean📝 Commits (1)
f5dcad4fix(images): add null-check in upload_image to prevent crash on SSRF block📊 Changes
1 file changed (+10 additions, -0 deletions)
View changed files
📝
backend/open_webui/routers/images.py(+10 -0)📄 Description
Pull Request Checklist
Before submitting, make sure you've checked the following:
Closes #24565.devbranch.devto ensure no unrelated commits.Changelog Entry
Fixed
upload_imageto prevent crash whenget_image_datareturns(None, None)due to SSRF block (e.g., ComfyUI on private IP)Description
get_image_datareturns(None, None)due to an SSRF block (e.g., ComfyUI on private IP like192.168.x.x),upload_imagecrashed with'NoneType' object has no attribute 'lower'inmimetypes.guess_extensionvalidate_url()to prevent SSRF attacksupload_imagethat raises a descriptiveHTTPExceptionpointing users to theENABLE_RAG_LOCAL_WEB_FETCHworkaroundRelated
ENABLE_RAG_LOCAL_WEB_FETCH=trueAdditional Information
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.