Slightly adjust the security level of try fix
https://github.com/ltdrdata/ComfyUI-Manager/issues/1049
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user