mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2026-11-05 07:47:25 +00:00
[PR #3165] Fix legacy ComfyUI batch update #3067
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/ComfyUI-Manager#3067
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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/Comfy-Org/ComfyUI-Manager/pull/3165
Author: @BILLFANLL
Created: 8/14/2026
Status: 🔄 Open
Base:
manager-v4← Head:agent/fix-legacy-update-request📝 Commits (1)
4ae6f5cFix legacy ComfyUI batch update📊 Changes
2 files changed (+41 additions, -5 deletions)
View changed files
📝
comfyui_manager/legacy/manager_server.py(+5 -1)📝
tests/test_legacy_secgate_other_paths.py(+36 -4)📄 Description
Summary
/queue/batchinstead of invoking an HTTP handler withNone.Fixes #2843.
Root cause
The legacy batch handler called
update_comfyui(None). After the simple-form POST guard was added, that route handler passedNonetoreject_simple_form_post, which then tried to readrequest.content_typeand raisedAttributeError.Passing the outer batch request to the direct endpoint is not safe either: the current legacy frontend sends
JSON.stringify(batch)without an explicit Content-Type, so browsers usetext/plain;charset=UTF-8. The direct endpoint's guard would reject it, while the outer batch handler would still return 200 without queueing the update.This change avoids handler-to-handler calls and keeps the direct route's existing security behavior unchanged.
Validation
venv/bin/python -m pytest -q tests/test_legacy_secgate_other_paths.py— 46 passedvenv/bin/ruff check comfyui_manager/legacy/manager_server.py tests/test_legacy_secgate_other_paths.py— passedvenv/bin/python -m py_compile comfyui_manager/legacy/manager_server.py tests/test_legacy_secgate_other_paths.py— passedgit diff --check— passeduv build— sdist and wheel built successfullytests/common/test_git_helper.pywhere the fake repo exposes.headswhile the implementation calls.list_heads()Security scope
This fixes the
Nonerequest crash without weakeningreject_simple_form_post. It does not claim to change the broader existing Content-Type policy of the body-reading batch endpoint.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.