Commit Graph

13 Commits

Author SHA1 Message Date
Dr.Lt.Data
ee2f655370 fix(security): harden CSRF with Content-Type gate and OpenAPI sync
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 04:50:34 +09:00
David
ae6c7dd673
Changed Main Dialog to match aesthetics and close button location as Original ComfyUI Interface (#2349)
Some checks are pending
Python Linting / Run Ruff (push) Waiting to run
* Started changing UI to match the rest of ComfyUI

Completed Main Container

* - Added layout formatting to components of the Manager dialog box
- Pulled name from select and put it into a label (eg "DB: Channel" now has a label of DB and a dropdown with channel, etc)
- Fixed incorrect z-index

* Removed this.close() I added before finding z-index issue.

* Matched buttons and drop downs to match style of ComfyUI interface while keeping the colours the same as OG ComfyUI Manager

* - Took gui building out and put into its own .js
- Applied theme to Nodes Manager
- Made theme respect user theme colors

* - Themed model manager and snapshot manager
- fixed incorrect id in gui builder

* Fix syntax error in color property

---------

Co-authored-by: Dr.Lt.Data <128333288+ltdrdata@users.noreply.github.com>
2025-12-19 12:34:20 +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
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
a148bb5aeb modified: apply new front's confirm api 2025-01-02 02:23:21 +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
8b39c4f000 fix: button size 2024-04-09 22:21:12 +09:00
Dr.Lt.Data
aed16687ca fix: reboot button occassionally doesn't work 2024-02-25 23:18:20 +09:00
dr.lt.data
58a2494715 code formatting
update db
2024-01-16 10:45:24 +09:00
Dr.Lt.Data
720974b118 layout update 2023-12-07 20:49:28 +09:00
Dr.Lt.Data
86fe6b317e fix: log file permission issue when reboot on windows
enhance: pretty conflict nodes message
2023-11-27 12:40:45 +09:00
Dr.Lt.Data
de85111a40 feat: restart ComfyUI when update/install 2023-11-26 18:36:56 +09:00
Dr.Lt.Data
7fbe34f8db feat: snapshot 2023-11-04 17:17:55 +09:00