From 46566848bb664c5c5dab15c06a58b7befd008ba2 Mon Sep 17 00:00:00 2001 From: SAY-5 Date: Mon, 11 May 2026 13:01:13 -0700 Subject: [PATCH] chore: remove em-dashes from comments --- glob/manager_server.py | 8 ++++---- tests/test_csrf_content_type_helper.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/glob/manager_server.py b/glob/manager_server.py index 2b97cb23..ae83270b 100644 --- a/glob/manager_server.py +++ b/glob/manager_server.py @@ -333,7 +333,7 @@ def _reject_simple_form_content_type(request): Applied ONLY to POST handlers that do not consume a request body (e.g., /snapshot/save, /manager/queue/{reset,start,update_comfyui}, /manager/reboot). These are vulnerable to cross-origin
- attacks because the handler accepts the request without parsing any body — + attacks because the handler accepts the request without parsing any body, the attacker needs no ability to forge a valid payload, only to point a hidden form at the URL. @@ -342,8 +342,8 @@ def _reject_simple_form_content_type(request): body because the browser refuses to send ``application/json`` without a CORS preflight, which this server does not answer. - DO NOT add this gate to body-reading handlers — redundant and UX-breaking. - DO NOT remove this gate from no-body handlers — this is the bypass vector. + DO NOT add this gate to body-reading handlers, redundant and UX-breaking. + DO NOT remove this gate from no-body handlers, this is the bypass vector. aiohttp's ``request.content_type`` normalizes the header (lower-cases, strips parameters), so ``multipart/form-data; boundary=----X`` is compared @@ -353,7 +353,7 @@ def _reject_simple_form_content_type(request): web.Response(status=400) when the request has a simple-form Content-Type that must be rejected. None when the request is allowed to proceed (no Content-Type, application/json, or any non-simple - Content-Type, or no request object — internal caller). + Content-Type, or no request object, internal caller). """ # Internal callers (e.g. legacy-UI batch flows) invoke route handlers # directly with request=None; there is no Content-Type to gate. diff --git a/tests/test_csrf_content_type_helper.py b/tests/test_csrf_content_type_helper.py index f2e67482..0a167a67 100644 --- a/tests/test_csrf_content_type_helper.py +++ b/tests/test_csrf_content_type_helper.py @@ -23,7 +23,7 @@ from aiohttp.test_utils import TestClient, TestServer # Parse the helper from manager_server.py without importing it, to avoid # pulling in the full ComfyUI/PromptServer stack. Note: we intentionally do -# NOT add the `glob/` directory to sys.path — the dir name would shadow +# NOT add the `glob/` directory to sys.path, the dir name would shadow # Python's stdlib `glob` module and break pytest collection. REPO_ROOT = Path(__file__).resolve().parent.parent