mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2026-11-04 23:37:31 +00:00
[PR #3298] [MERGED] v3: Restrict Flagged CNR installs on non-local listeners #3173
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#3173
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/3298
Author: @ltdrdata
Created: 9/18/2026
Status: ✅ Merged
Merged: 9/18/2026
Merged by: @ltdrdata
Base:
main← Head:feat/v3-flagged-policy📝 Commits (1)
1796c72Restrict flagged CNR installs on non-local listeners📊 Changes
10 files changed (+1004 additions, -91 deletions)
View changed files
📝
README.md(+45 -0)📝
glob/cnr_utils.py(+2 -1)📝
glob/manager_core.py(+138 -68)📝
glob/manager_server.py(+19 -10)📝
glob/manager_util.py(+47 -1)📝
prestartup_script.py(+21 -3)➕
tests/e2e/test_e2e_flagged_nodepacks.py(+400 -0)➕
tests/test_flagged_nodepack_policy.py(+325 -0)📝
tests/test_install_flags_gates.py(+3 -3)📝
tests/test_write_config_persistence.py(+4 -5)📄 Description
Purpose and scope
A successful Registry install response previously allowed a Flagged CNR version to proceed. Require Flagged versions to satisfy the same installation conditions as Active versions, plus a server listening exclusively on loopback or an explicit administrator override. Covers installation, reinstallation, switching, updates, deferred startup and server-scheduled restores.
The allow_flagged_nodepack_install option belongs in config.ini’s [default] section. It defaults to false; only case-insensitive true enables it, after restarting ComfyUI. The override is intended for a trusted private network and permits non-loopback listeners. It does not detect private networks or bypass common security checks, Registry refusals or Git/pip restrictions. Active and Pending installation behavior is retained.
Key changes
Affected modules: CNR metadata mapping, installation core, server queues, startup processing, configuration and README. Deferred switches use stored status without refreshing it from the Registry. Older reservations without status require loopback-only listeners or the override; otherwise startup rejects them without changing the pack and tells the user to request installation again. Enabling an already installed identical version remains a local activation with no Registry lookup or installation script.
Validation approach
Core tests run production installation paths with controlled external responses. Server E2E uses real HTTP requests, queues, ZIP installation, restart and CLI subprocesses, with a local Registry and isolated paths, settings and databases. Live Chromium scenarios also exercise the combined UI through real routes and WebSocket completion.
Tests fail when status propagation or reinstall script execution is deliberately removed, and pass when restored. Allowed installation controls also pass.
Validation results
1796c72f, non-E2E regressionThe six policy E2E skips require a preinstalled pack under strong security. Strong-security denial is tested directly. The full policy suite passed when run alone after an initial parallel run encountered a test-server port collision. No product code or assertions were changed to address that fixture collision.
Snapshot checks establish admission, extraction and denial-state preservation. Fresh-snapshot install.py completion and file-lock/deferred-deletion handling remain outside this PR.
Fixture E2E uses ComfyUI 039ed38e on Python 3.10.20 and frontend 1.45.15; other tests use Python 3.12. v3 starts without --enable-manager. Browser checks use single-tab sessions. The public Registry was not exercised in this rerun.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.