diff options
| author | qvkap <qvkapp@gmail.com> | 2026-09-05 08:29:46 +0300 |
|---|---|---|
| committer | qvkap <qvkapp@gmail.com> | 2026-09-05 08:29:46 +0300 |
| commit | 74c76bb5cea8ff70153a8f9ebe02df6ffb0205f7 (patch) | |
| tree | 7dd16b620d79f579a3ddf4da29e7a55fb585af2f /src/delete.rs | |
| parent | 22f9abec46c28f50df2c19b134da88848942c168 (diff) | |
| download | ror-74c76bb5cea8ff70153a8f9ebe02df6ffb0205f7.tar.gz ror-74c76bb5cea8ff70153a8f9ebe02df6ffb0205f7.zip | |
fix: dependency resolution, update file removal and sync TLS validation
Diffstat (limited to 'src/delete.rs')
| -rw-r--r-- | src/delete.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/delete.rs b/src/delete.rs index 6966f82..094e4c4 100644 --- a/src/delete.rs +++ b/src/delete.rs @@ -175,7 +175,13 @@ pub fn remove_package_files_only(_pkg_name: &str, files: &[String]) -> bool { let mut failed = false; for rel_path in files { - let full_path = Path::new("/").join(rel_path); + let clean = rel_path.trim_start_matches('/'); + if clean.contains("..") || clean.is_empty() { + eprintln!("{} Skipping suspicious path: {}", "[ror]".red().bold(), rel_path); + failed = true; + continue; + } + let full_path = Path::new("/").join(clean); if full_path.exists() { debug!("Removing file {}", full_path.display()); if let Err(e) = fs::remove_file(&full_path) { |