Slightly adjust the security level of try fix

https://github.com/ltdrdata/ComfyUI-Manager/issues/1049
This commit is contained in:
Dr.Lt.Data 2024-10-16 08:31:35 +09:00
parent b139bfabf0
commit e8bb7ccda7
3 changed files with 7 additions and 3 deletions

View File

@ -23,7 +23,7 @@ sys.path.append(glob_path)
import cm_global
from manager_util import *
version = [2, 51, 7]
version = [2, 51, 8]
version_str = f"V{version[0]}.{version[1]}" + (f'.{version[2]}' if len(version) > 2 else '')

View File

@ -850,7 +850,7 @@ async def install_custom_node(request):
@PromptServer.instance.routes.post("/customnode/fix")
async def fix_custom_node(request):
if not is_allowed_security_level('high'):
if not is_allowed_security_level('middle'):
print(SECURITY_MESSAGE_GENERAL)
return web.Response(status=403)
@ -871,6 +871,10 @@ async def fix_custom_node(request):
return web.Response(status=400)
if 'pip' in json_data:
if not is_allowed_security_level('high'):
print(SECURITY_MESSAGE_GENERAL)
return web.Response(status=403)
for pname in json_data['pip']:
install_cmd = [sys.executable, "-m", "pip", "install", '-U', pname]
core.try_install_script(json_data['files'][0], ".", install_cmd)

View File

@ -1,7 +1,7 @@
[project]
name = "comfyui-manager"
description = "ComfyUI-Manager provides features to install and manage custom nodes for ComfyUI, as well as various functionalities to assist with ComfyUI."
version = "2.51.7"
version = "2.51.8"
license = { file = "LICENSE.txt" }
dependencies = ["GitPython", "PyGithub", "matrix-client==0.4.0", "transformers", "huggingface-hub>0.20", "typer", "rich", "typing-extensions"]