X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=bin%2FBackupPC_tarExtract;h=954da702b06691bdce5da48ba92dac5544d49980;hp=55217b997b9d1139c255ab2a3528e57aa3c53d22;hb=d1bfa4d92bec24954f2e7877f6531644bb84e8f3;hpb=5b3e6091d542c2e7445d5dd511cdf6e20aec8b8d diff --git a/bin/BackupPC_tarExtract b/bin/BackupPC_tarExtract index 55217b9..954da70 100755 --- a/bin/BackupPC_tarExtract +++ b/bin/BackupPC_tarExtract @@ -1,4 +1,4 @@ -#!/bin/perl +#!/usr/bin/perl #============================================================= -*-perl-*- # # BackupPC_tarExtract: extract data from a dump @@ -9,7 +9,7 @@ # Craig Barratt # # COPYRIGHT -# Copyright (C) 2001-2003 Craig Barratt +# Copyright (C) 2001-2009 Craig Barratt # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -27,7 +27,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.2.0, released 31 Jul 2010. # # See http://backuppc.sourceforge.net. # @@ -59,11 +59,11 @@ if ( $ARGV[0] !~ /^([\w\.\s-]+)$/ ) { exit(1); } my $client = $1; -if ( $ARGV[1] !~ /^([\w\s.\/$(){}[\]-]+)$/ ) { +if ( $ARGV[1] =~ m{(^|/)\.\.(/|$)} ) { print("$0: bad share name '$ARGV[1]'\n"); exit(1); } -my $ShareNameUM = $1; +my $ShareNameUM = $1 if ( $ARGV[1] =~ /(.*)/ ); my $ShareName = $bpc->fileNameEltMangle($ShareNameUM); if ( $ARGV[2] !~ /^(\d+)$/ ) { print("$0: bad compress level '$ARGV[2]'\n");