Skip to content

Commit 31c49aa

Browse files
committed
Fix path traversal
1 parent 9fe5dbc commit 31c49aa

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

CHANGELOG.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ Release 0.14.0 (unreleased)
1414
* Fix "unsafe symlink target" error for archives containing relative ``..`` symlinks (#1122)
1515
* Fix ``dfetch add`` crashing with a ``ValueError`` when the remote URL has a trailing slash (#1137)
1616
* Fix unhelpful error message when a metadata file is malformed (#1145)
17-
* Fix arbitrary file write via malicious tar/zip symlink (#0)
18-
* Prevent ssh command injection (#0)
17+
* Fix arbitrary file write via malicious tar/zip symlink (#1152)
18+
* Prevent ssh command injection (#1152)
1919

2020
Release 0.13.0 (released 2026-03-30)
2121
====================================

script/create_release_notes.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,13 @@ def main():
4949
)
5050
args = parser.parse_args()
5151

52-
changelog_path = Path(args.changelog)
52+
try:
53+
changelog_path = Path(args.changelog).resolve()
54+
changelog_path.relative_to(Path.cwd().resolve())
55+
except ValueError:
56+
print(f"Error: {args.changelog} is outside the current directory.")
57+
sys.exit(1)
58+
5359
if not changelog_path.exists():
5460
print(f"Error: {changelog_path} not found.")
5561
sys.exit(1)

0 commit comments

Comments
 (0)