Skip to content

Commit 50b9844

Browse files
committed
Security policy changed.
'normal' is changed to 'normal-' and 'normal-' doesn't allow high-security features even if ComfyUI is running with local hosting.
1 parent a580a5a commit 50b9844

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
![menu](misc/menu.jpg)
66

77
## NOTICE
8+
* V2.47: Security policy has been changed. The former 'normal' is now 'normal-', and 'normal' no longer allows high-risk features, even if your ComfyUI is local.
89
* V2.37 Show a ✅ mark to accounts that have been active on GitHub for more than six months.
910
* V2.33 Security policy is applied.
1011
* V2.21 [cm-cli](docs/en/cm-cli.md) tool is added.
@@ -350,6 +351,9 @@ When you run the `scan.sh` script:
350351
* `strong`
351352
* doesn't allow `high` and `middle` level risky feature
352353
* `normal`
354+
* doesn't allow `high` level risky feature
355+
* `middle` level risky feature is available
356+
* `normal-`
353357
* doesn't allow `high` level risky feature if `--listen` is specified and not starts with `127.`
354358
* `middle` level risky feature is available
355359
* `weak`

glob/manager_core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import cm_global
2424
from manager_util import *
2525

26-
version = [2, 46, 5]
26+
version = [2, 47]
2727
version_str = f"V{version[0]}.{version[1]}" + (f'.{version[2]}' if len(version) > 2 else '')
2828

2929

glob/manager_server.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ def handle_stream(stream, prefix):
4848
def is_allowed_security_level(level):
4949
if level == 'high':
5050
if is_local_mode:
51-
return core.get_config()['security_level'].lower() in ['weak', 'normal']
51+
return core.get_config()['security_level'].lower() in ['weak', 'normal-']
5252
else:
5353
return core.get_config()['security_level'].lower() == 'weak'
5454
elif level == 'middle':
55-
return core.get_config()['security_level'].lower() in ['weak', 'normal']
55+
return core.get_config()['security_level'].lower() in ['weak', 'normal', 'normal-']
5656
else:
5757
return True
5858

@@ -858,7 +858,7 @@ async def fix_custom_node(request):
858858
@PromptServer.instance.routes.post("/customnode/install/git_url")
859859
async def install_custom_node_git_url(request):
860860
if not is_allowed_security_level('high'):
861-
print(f"ERROR: To use this feature, you must set '--listen' to a local IP and set the security level to 'middle' or 'weak'. Please contact the administrator.")
861+
print(f"ERROR: To use this feature, you must either set '--listen' to a local IP and set the security level to 'normal-' or lower, or set the security level to 'middle' or 'weak'. Please contact the administrator.")
862862
return web.Response(status=403)
863863

864864
url = await request.text()
@@ -874,7 +874,7 @@ async def install_custom_node_git_url(request):
874874
@PromptServer.instance.routes.post("/customnode/install/pip")
875875
async def install_custom_node_git_url(request):
876876
if not is_allowed_security_level('high'):
877-
print(f"ERROR: To use this feature, you must set '--listen' to a local IP and set the security level to 'middle' or 'weak'. Please contact the administrator.")
877+
print(f"ERROR: To use this feature, you must either set '--listen' to a local IP and set the security level to 'normal-' or lower, or set the security level to 'middle' or 'weak'. Please contact the administrator.")
878878
return web.Response(status=403)
879879

880880
packages = await request.text()
@@ -990,7 +990,7 @@ async def install_model(request):
990990
return web.Response(status=403)
991991

992992
if not json_data['filename'].endswith('.safetensors') and not is_allowed_security_level('high'):
993-
print(f"ERROR: To use this feature, you must set '--listen' to a local IP and set the security level to 'middle' or 'weak'. Please contact the administrator.")
993+
print(f"ERROR: To use this feature, you must either set '--listen' to a local IP and set the security level to 'normal-' or lower, or set the security level to 'middle' or 'weak'. Please contact the administrator.")
994994
return web.Response(status=403)
995995

996996
res = False
@@ -1040,7 +1040,7 @@ def write_stdout(self, msg):
10401040
@PromptServer.instance.routes.get("/manager/terminal")
10411041
async def terminal_mode(request):
10421042
if not is_allowed_security_level('high'):
1043-
print(f"ERROR: To use this action, a security_level of `weak` is required. Please contact the administrator.")
1043+
print(f"ERROR: To use this feature, you must either set '--listen' to a local IP and set the security level to 'normal-' or lower, or set the security level to 'middle' or 'weak'. Please contact the administrator.")
10441044
return web.Response(status=403)
10451045

10461046
if "mode" in request.rel_url.query:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
name = "comfyui-manager"
33
description = "ComfyUI-Manager provides features to install and manage custom nodes for ComfyUI, as well as various functionalities to assist with ComfyUI."
4-
version = "2.46.5"
4+
version = "2.47"
55
license = "LICENSE"
66
dependencies = ["GitPython", "PyGithub", "matrix-client==0.4.0", "transformers", "huggingface-hub>0.20", "typer", "rich", "typing-extensions"]
77

0 commit comments

Comments
 (0)