Skip to content

Commit

Permalink
fix: Prevent vfolder request-download API from accessing host files…
Browse files Browse the repository at this point in the history
…ystem
  • Loading branch information
jopemachine committed Dec 11, 2024
1 parent 0b0ae9d commit a0c74cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ai/backend/storage/api/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class Params(TypedDict):
if (dst_dir := params["dst_dir"]) is not None:
parent_dir = vfpath / dst_dir
file_path = parent_dir / token_data["relpath"]
file_path.relative_to(vfpath)
file_path.resolve().relative_to(vfpath)
if not file_path.exists():
raise FileNotFoundError
except (ValueError, FileNotFoundError):
Expand Down

0 comments on commit a0c74cd

Please sign in to comment.