From de053014116837eba145350cb0aa97524d745d1f Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sat, 28 Sep 2019 14:55:44 +0200 Subject: Import untaint function where used Better code readability than with the full name. Signed-off-by: Florian Pritz --- lib/App/BorgRestore.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/App/BorgRestore.pm') diff --git a/lib/App/BorgRestore.pm b/lib/App/BorgRestore.pm index 2ae0a09..8716bfb 100644 --- a/lib/App/BorgRestore.pm +++ b/lib/App/BorgRestore.pm @@ -6,7 +6,7 @@ our $VERSION = "3.3.0"; use App::BorgRestore::Borg; use App::BorgRestore::DB; -use App::BorgRestore::Helper; +use App::BorgRestore::Helper qw(untaint); use App::BorgRestore::PathTimeTable::DB; use App::BorgRestore::PathTimeTable::Memory; use App::BorgRestore::Settings; @@ -327,8 +327,8 @@ process during method execution since this is required by C<`borg extract`>. =cut method restore($path, $archive, $destination) { - $destination = App::BorgRestore::Helper::untaint($destination, qr(.*)); - $path = App::BorgRestore::Helper::untaint($path, qr(.*)); + $destination = untaint($destination, qr(.*)); + $path = untaint($path, qr(.*)); $log->infof("Restoring %s to %s from archive %s", $path, $destination, $archive->{archive}); @@ -342,7 +342,7 @@ method restore($path, $archive, $destination) { my $workdir = pushd($destination, {untaint_pattern => qr{^(.*)$}}); my $final_destination = abs_path($basename); - $final_destination = App::BorgRestore::Helper::untaint($final_destination, qr(.*)); + $final_destination = untaint($final_destination, qr(.*)); $log->debugf("Removing %s", $final_destination); File::Path::remove_tree($final_destination); $self->{deps}->{borg}->restore($components_to_strip, $archive->{archive}, $path); -- cgit v1.2.3-24-g4f1b