mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-12-03 03:55:12 +00:00
fixes - allowed hosts, image get folders, extensions after termination
This commit is contained in:
parent
0d948be090
commit
08693c22f0
5 changed files with 30 additions and 16 deletions
|
|
@ -28,7 +28,7 @@ class ImageGet(ApiHandler):
|
|||
in_base = files.is_in_base_dir(files.fix_dev_path(path))
|
||||
else:
|
||||
in_base = files.is_in_base_dir(path)
|
||||
if not in_base:
|
||||
if not in_base and not files.is_in_dir(path, "/root"):
|
||||
raise ValueError("Path is outside of allowed directory")
|
||||
|
||||
# get file extension and info
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue