Skip to content

Commit 89c0bf3

Browse files
committed
chore(release): 4.2.1 — register extension.manager.supports_csrf_post feature flag
Lets clients detect CSRF-POST backend support via ComfyUI core's feature_flags instead of parsing version strings. Absence of the flag indicates a Manager version < 4.2.1 that is incompatible with POST-only state-mutation endpoints. Follow-up to #2818; no endpoint or security behavior change. CHANGELOG: fold [Unreleased] into the 4.2.1 entry (this PR ships as 4.2.1); compare link anchored at v4.1b6 (no v4.2 tag planned).
1 parent 4410ebc commit 89c0bf3

3 files changed

Lines changed: 32 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ All notable changes to **ComfyUI-Manager** are documented in this file.
55
The format is based on [Keep a Changelog 1.1.0](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.0.html).
77

8-
## [Unreleased]
8+
## [4.2.1] - 2026-04-22
99

10-
Security-hardening release on branch `fix/csrf-post-conversion`. Contains
11-
breaking-ish API changes for state-mutating endpoints. See **Migration notes**
12-
below before upgrading programmatic clients.
10+
Security-hardening release. Contains breaking-ish API changes for
11+
state-mutating endpoints. See **Migration notes** below before upgrading
12+
programmatic clients.
1313

1414
### Security
1515

@@ -65,6 +65,12 @@ below before upgrading programmatic clients.
6565

6666
### Added
6767

68+
- **Server-push feature flag `extension.manager.supports_csrf_post`** registered
69+
at startup, allowing ComfyUI-frontend (and other clients) to detect
70+
CSRF-POST backend support as a semantic capability contract, without
71+
relying on version string parsing. Manager versions prior to 4.2.1 do not
72+
set the flag — clients should treat its absence as 'incompatible with
73+
POST-only state-mutation endpoints'.
6874
- **E2E test harness variants** for security-level and legacy-mode scenarios:
6975
`tests/e2e/scripts/start_comfyui_legacy.sh`,
7076
`tests/e2e/scripts/start_comfyui_permissive.sh`,
@@ -120,4 +126,4 @@ below before upgrading programmatic clients.
120126
perform the change from a trusted entry point. Read access via `GET` is
121127
unaffected.
122128

123-
[Unreleased]: https://github.com/Comfy-Org/ComfyUI-Manager/compare/v4.1b6...HEAD
129+
[4.2.1]: https://github.com/Comfy-Org/ComfyUI-Manager/compare/v4.1b6...v4.2.1

comfyui_manager/__init__.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,26 @@
66
from comfy.cli_args import args
77

88

9+
# Register server-push feature flag so ComfyUI_frontend (and other clients)
10+
# can detect CSRF-POST backend capability as a semantic contract (vs version
11+
# string parsing). See PR #2818 for context; clients use this flag to decide
12+
# whether to invoke POST state-mutation endpoints. Manager versions prior to
13+
# 4.2.1 do not set this flag — clients should treat its absence as
14+
# 'incompatible with POST-only state-mutation endpoints'.
15+
try:
16+
from comfy_api import feature_flags as _core_feature_flags
17+
_mgr_flags = (
18+
_core_feature_flags.SERVER_FEATURE_FLAGS
19+
.setdefault('extension', {})
20+
.setdefault('manager', {})
21+
)
22+
_mgr_flags['supports_csrf_post'] = True
23+
except ImportError:
24+
# Older ComfyUI core without comfy_api.feature_flags module.
25+
# Manager functions but clients will not observe the flag.
26+
pass
27+
28+
929
def prestartup():
1030
from . import prestartup_script # noqa: F401
1131
logging.info('[PRE] ComfyUI-Manager')

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
55
[project]
66
name = "comfyui-manager"
77
license = { text = "GPL-3.0-only" }
8-
version = "4.2"
8+
version = "4.2.1"
99
requires-python = ">= 3.9"
1010
description = "ComfyUI-Manager provides features to install and manage custom nodes for ComfyUI, as well as various functionalities to assist with ComfyUI."
1111
readme = "README.md"

0 commit comments

Comments
 (0)