protect against writes outside of output directory
This commit is contained in:
+2
-1
@@ -126,7 +126,8 @@ macro_rules! output_path_fn {
|
||||
_ => tmpl_str,
|
||||
};
|
||||
let tmpl = PathBuf::from(tmpl_str);
|
||||
let mut path = self.path.clone();
|
||||
let mut path = self.path.clone().canonicalize()
|
||||
.expect(&format!("ERROR: unable to canonicalize output path: {}", self.path.display()));
|
||||
path.push(tmpl);
|
||||
match $is_dir {
|
||||
true => {
|
||||
|
||||
Reference in New Issue
Block a user