X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=bin%2FBackupPC_tarExtract;h=af9b298bef4b4bf55bcc2138a34e5f19f0c47a07;hp=1686ffda95e78a34c33ae9474458796973d50a93;hb=fda25dc88a63ccac1c80efa2e4994bf0725ca9b7;hpb=546f9691f118c9ea2d164f377994b4a018a60d02 diff --git a/bin/BackupPC_tarExtract b/bin/BackupPC_tarExtract index 1686ffd..af9b298 100755 --- a/bin/BackupPC_tarExtract +++ b/bin/BackupPC_tarExtract @@ -9,7 +9,7 @@ # Craig Barratt # # COPYRIGHT -# Copyright (C) 2001-2003 Craig Barratt +# Copyright (C) 2001-2007 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 2.1.0, released 20 Jun 2004. +# Version 3.1.0, released 25 Nov 2007. # # 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"); @@ -260,7 +260,7 @@ sub TarReadFileInfo from_to($name, $Conf{ClientCharset}, "utf8"); from_to($linkname, $Conf{ClientCharset}, "utf8"); } - printf("File now $name (hex: %s)\n", unpack("H*", $name)); + # printf("File now $name (hex: %s)\n", unpack("H*", $name)); $name =~ s{^\./+}{}; $name =~ s{/+\.?$}{};