Commit Graph
9 Commits
Author SHA1 Message Date
Dr.Lt.Data 307bec483e Enable a disabled node pack requested through cm-api before restarting (#3525)
When an extension asks through cm.try-install-custom-node for a node
pack that is disabled, the user is asked whether to enable it and
restart. On confirmation the handler posted to
/customnode/toggle_active, which the server does not have, did not
look at the answer, and restarted: ComfyUI came back with the pack
still disabled.

- Enable the pack as the Custom Nodes Manager does: find its row in
  /customnode/getlist, put it in the queue, start the queue, and wait
  for the queue to report the pack
- Restart only when the queue reports success; otherwise show why the
  pack was not enabled
- Leave a queue that is already running alone
- End the wait when the started queue reports without the pack, or
  does not report within a minute; a listener left waiting would take
  a later report for the same row and restart ComfyUI unasked
- Show the reason when a request made while enabling gets no answer
- Show "Rebooting..." when the restart request gets no answer, which
  is what happens when ComfyUI restarts
- Remove the branch for a pack that is not installed: the server does
  not send this request for one, and the route it posted to does not
  exist
- Leave the queue listener of the Manager menu when the menu has not
  been created; a queue started from here made it raise
- Add browser tests of the handler and of the menu listener
- Add a CHANGELOG entry

The same change for manager-v4 is #3526.
2026-11-14 23:42:36 +09:00
Dr.Lt.Data 491f847bbc fix(security): harden CSRF with Content-Type gate and OpenAPI sync (#2819)
Defense-in-depth over GET→POST alone: reject the three CORS-safelisted
simple-form Content-Types (x-www-form-urlencoded, multipart/form-data,
text/plain) on 5 no-body POST handlers (snapshot/save,
manager/queue/{reset,start,update_comfyui}, manager/reboot) to block
<form method=POST> CSRF that bypasses method-only gating. Convert 10 pure
state-changing endpoints (fetch_updates, queue/{update_all,reset,start,
update_comfyui}, snapshot/{remove,restore,save}, comfyui_switch_version,
reboot) from GET to POST and split 5 config endpoints
(db_mode/preview_method/channel_url_list/policy/{component,update}) into
GET(read) + POST(write, JSON body). Emit the in_progress + done event pair
from the /manager/queue/install sync-enable fast-path so client UI
finalizes (previously only queue/start's empty worker done fired, leaving
item.restart unset and the Enable button visible after a successful enable).
Harden js/custom-nodes-manager.js completion path: await onQueueCompleted
with try/catch (surfaces silent turbogrid stale-item throws), replace the
{}.length == 0 no-op empty guard, set install_context before queue/install
to avoid a sync-completion race, wrap classList/updateCell in try/catch.
Resynchronize openapi.yaml with the converted routes (method → post, query
params → requestBody JSON schema, sibling post on 5 split endpoints).
Update 31 JS fetchApi call sites across 7 files; add
tests/test_csrf_content_type_helper.py covering 5 Content-Type cases via
aiohttp TestClient.

Reported-by: XlabAI Team of Tencent Xuanwu Lab
CVSS: 8.1 (AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H)
2026-04-22 05:04:07 +09:00
Dr.Lt.Data aaed1dc3d5 feat(security): Support System User Protection API with security migration (V3.38) (#2338)
- Migrate Manager data path: default/ComfyUI-Manager → __manager
- Force security_level=strong on outdated ComfyUI (block installations)
- Auto-migrate config.ini only; backup legacy files for manual verification
- Raise weak/normal- to normal during migration
- Add /manager/startup_alerts API for UI warnings
- Differentiate 403 responses: comfyui_outdated vs security_level
- Block startup scripts execution on old ComfyUI

Requires ComfyUI v0.3.76+ for full functionality.
Backward compatible with older versions (uses legacy path).
2025-12-03 00:42:12 +09:00
Dr.Lt.Data 830be27eb2 FIXED: Resolved an issue that occurred when attempting to install the nightly version if it was not registered in custom-node-list.json.
FIXED: Improved error reporting for invalid Git URLs.

https://github.com/ltdrdata/ComfyUI-Manager/issues/1413
2025-01-11 11:38:12 +09:00
Dr.Lt.Data 3c11361502 Merge branch 'main' into feat/cnr
improved: support new front's prompt, alert api
modified: z-indices
2025-01-02 02:58:55 +09:00
Dr.Lt.Data 939cb12670 fixed: alternative implementation for confirm
`confirm` cannot be used in electron
2024-12-31 14:37:03 +09:00
Dr.Lt.Data 3892e3f5e7 fix: missing title in tryInstallCustomNode 2024-08-08 22:48:18 +09:00
Dr.Lt.Data 1c313ee822 Security patch
https://github.com/comfyanonymous/ComfyUI/issues/3473#issuecomment-2109154269
2024-05-15 00:28:38 +09:00
Dr.Lt.Data 60386b569e feat: custom node install api 2023-12-23 16:16:11 +09:00