X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=bin%2FBackupPC_tarCreate;h=e0fd0fb90ad837a3befce38ae73d536f4065487a;hp=97b9878eb690675917885c97be38a26878525b86;hb=b81d2da5e16975674f011e4833337ac0fa24e0ea;hpb=5b3e6091d542c2e7445d5dd511cdf6e20aec8b8d diff --git a/bin/BackupPC_tarCreate b/bin/BackupPC_tarCreate index 97b9878..e0fd0fb 100755 --- a/bin/BackupPC_tarCreate +++ b/bin/BackupPC_tarCreate @@ -53,7 +53,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta2, released 11 Nov 2006. # # See http://backuppc.sourceforge.net. # @@ -96,7 +96,8 @@ EOF exit(1); } -if ( $opts{h} !~ /^([\w\.\s-]+)$/ ) { +if ( $opts{h} !~ /^([\w\.\s-]+)$/ + || $opts{h} =~ m{(^|/)\.\.(/|$)} ) { print(STDERR "$0: bad host name '$opts{h}'\n"); exit(1); } @@ -130,7 +131,7 @@ $Charset = $opts{e} if ( $opts{e} ne "" ); my $PathRemove = $1 if ( $opts{r} =~ /(.+)/ ); my $PathAdd = $1 if ( $opts{p} =~ /(.+)/ ); -if ( $opts{s} !~ /^([\w\s.\/$(){}[\]-]+)$/ && $opts{s} ne "*" ) { +if ( $opts{s} =~ m{(^|/)\.\.(/|$)} ) { print(STDERR "$0: bad share name '$opts{s}'\n"); exit(1); }