mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2025-12-17 02:12:58 +08:00
fixed: robust validation when model downloading #2
This commit is contained in:
parent
bbb54d4a08
commit
c3eed981c0
@ -43,7 +43,7 @@ import manager_downloader
|
|||||||
from node_package import InstalledNodePackage
|
from node_package import InstalledNodePackage
|
||||||
|
|
||||||
|
|
||||||
version_code = [3, 30, 8]
|
version_code = [3, 30, 9]
|
||||||
version_str = f"V{version_code[0]}.{version_code[1]}" + (f'.{version_code[2]}' if len(version_code) > 2 else '')
|
version_str = f"V{version_code[0]}.{version_code[1]}" + (f'.{version_code[2]}' if len(version_code) > 2 else '')
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -279,6 +279,10 @@ def get_model_dir(data, show_log=False) -> str | None:
|
|||||||
else:
|
else:
|
||||||
models_base = folder_paths.models_dir
|
models_base = folder_paths.models_dir
|
||||||
|
|
||||||
|
# NOTE: Validate to prevent path traversal.
|
||||||
|
if any(char in data['filename'] for char in {'/', '\\', ':'}):
|
||||||
|
return None
|
||||||
|
|
||||||
def resolve_custom_node(save_path):
|
def resolve_custom_node(save_path):
|
||||||
save_path = save_path[13:] # remove 'custom_nodes/'
|
save_path = save_path[13:] # remove 'custom_nodes/'
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "comfyui-manager"
|
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."
|
description = "ComfyUI-Manager provides features to install and manage custom nodes for ComfyUI, as well as various functionalities to assist with ComfyUI."
|
||||||
version = "3.30.8"
|
version = "3.30.9"
|
||||||
license = { file = "LICENSE.txt" }
|
license = { file = "LICENSE.txt" }
|
||||||
dependencies = ["GitPython", "PyGithub", "matrix-client==0.4.0", "transformers", "huggingface-hub>0.20", "typer", "rich", "typing-extensions", "toml", "uv", "chardet"]
|
dependencies = ["GitPython", "PyGithub", "matrix-client==0.4.0", "transformers", "huggingface-hub>0.20", "typer", "rich", "typing-extensions", "toml", "uv", "chardet"]
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user