Skip to content

Commit

Permalink
fix(workspace): resolve symlinks in workspace path before checking
Browse files Browse the repository at this point in the history
  • Loading branch information
Pwuts committed Apr 19, 2023
1 parent a2723f1 commit 37ff26e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions autogpt/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def safe_path_join(base: Path, *paths: str | Path) -> Path:
Returns:
Path: The joined path
"""
base = base.resolve()
joined_path = base.joinpath(*paths).resolve()

if CFG.restrict_to_workspace and not joined_path.is_relative_to(base):
Expand Down

0 comments on commit 37ff26e

Please sign in to comment.