From 9afb903ebd14416267687017b8d236fe8d34c98f Mon Sep 17 00:00:00 2001 From: naoNao89 <90588855+naoNao89@users.noreply.github.com> Date: Tue, 16 Dec 2025 19:15:05 +0700 Subject: [PATCH] fix(#172): prevent OUT_DIR escape for '..' file paths Restore ParentDir check lost in #931 refactoring. Paths with '..' now hashed to stay within OUT_DIR. - src/command_helpers: re-add Component::ParentDir check - tests: 3 new regression tests --- src/command_helpers.rs | 1 + tests/test.rs | 88 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+) diff --git a/src/command_helpers.rs b/src/command_helpers.rs index 3b01115a..c80f5061 100644 --- a/src/command_helpers.rs +++ b/src/command_helpers.rs @@ -323,6 +323,7 @@ pub(crate) fn objects_from_files(files: &[Arc], dst: &Path) -> Result