summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xborg-restore.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/borg-restore.pl b/borg-restore.pl
index bfdc58c..6f63de7 100755
--- a/borg-restore.pl
+++ b/borg-restore.pl
@@ -273,6 +273,7 @@ sub restore {
mkdir($destination) unless -d $destination;
chdir($destination) or die "Failed to chdir: $!";
+ $final_destination = untaint($final_destination, qr(.*));
debug("Removing ".$final_destination);
File::Path::remove_tree($final_destination);
system(qw(borg extract -v --strip-components), $components_to_strip, "::".$archive->{archive}, $path);
@@ -626,7 +627,6 @@ sub main {
my $canon_path = File::Spec->canonpath($path);
my $abs_path = abs_path($canon_path);
- print Dumper($abs_path, $path, $canon_path);
if (!defined($abs_path)) {
say STDERR "Error: Failed to resolve path to absolute path: $canon_path: $!";
say STDERR "Make sure that all parts of the path, except the last one, exist.";