Skip to content

Commit b778445

Browse files
authored
Fix path resolution issue at code edit tools (#1054)
* fix path resolution issue at code edit tools * bump version
1 parent e9b7ee5 commit b778445

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

patchwork/common/tools/code_edit_tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def tool_records(self):
111111

112112
def __get_abs_path(self, path: str):
113113
abs_path = (self.repo_path / path.lstrip("/")).resolve()
114-
if not abs_path.is_relative_to(self.repo_path):
114+
if not abs_path.is_relative_to(self.repo_path.resolve()):
115115
raise ValueError(f"Path {path} contains illegal path traversal")
116116

117117
return abs_path

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "patchwork-cli"
3-
version = "0.0.79"
3+
version = "0.0.80"
44
description = ""
55
authors = ["patched.codes"]
66
license = "AGPL"

0 commit comments

Comments
 (0)