diff options
author | Florian Pritz <bluewind@xinu.at> | 2019-09-28 14:55:44 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2019-09-28 15:25:57 +0200 |
commit | de053014116837eba145350cb0aa97524d745d1f (patch) | |
tree | 5739af26b87855c69102aed3d4c802640c728aa9 /lib/App/BorgRestore.pm | |
parent | 6d92a2b4a449674f515cd7391c95e2c94e25cfba (diff) | |
download | App-BorgRestore-de053014116837eba145350cb0aa97524d745d1f.tar.gz App-BorgRestore-de053014116837eba145350cb0aa97524d745d1f.tar.xz |
Import untaint function where used
Better code readability than with the full name.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'lib/App/BorgRestore.pm')
-rw-r--r-- | lib/App/BorgRestore.pm | 8 |
1 files changed, 4 insertions, 4 deletions
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); |