X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=lib%2FBackupPC%2FCGI%2FRestore.pm;h=7fe7a5b13dffca884402794efb3bd1024f712eed;hp=1f8a9004c969d7471e6369e51d1411a13e373e2a;hb=fadae1eaa5482a441bc8e8aa829a063ee6a5f0c0;hpb=4cdaa6b8a9f5161ee2da4371d68cbbad41248ea0 diff --git a/lib/BackupPC/CGI/Restore.pm b/lib/BackupPC/CGI/Restore.pm index 1f8a900..7fe7a5b 100644 --- a/lib/BackupPC/CGI/Restore.pm +++ b/lib/BackupPC/CGI/Restore.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 3.0.0beta0, released 11 Jul 2006. +# Version 3.1.0beta0, released 3 Sep 2007. # # See http://backuppc.sourceforge.net. # @@ -40,7 +40,7 @@ use strict; use BackupPC::CGI::Lib qw(:all); use Data::Dumper; use File::Path; -use Encode; +use Encode qw/decode_utf8/; sub action { @@ -80,7 +80,7 @@ EOF EOF } $hiddenStr .= "\n"; - $hiddenStr .= "\n"; + $hiddenStr .= "\n"; $badFileCnt++ if ( $In{pathHdr} =~ m{(^|/)\.\.(/|$)} ); $badFileCnt++ if ( $In{num} =~ m{(^|/)\.\.(/|$)} ); if ( @fileList == 0 ) { @@ -112,7 +112,9 @@ EOF # # Tell the user what options they have # - $content .= eval("qq{$Lang->{Restore_Options_for__host2}}"); + $pathHdr = decode_utf8($pathHdr); + $share = decode_utf8($share); + $content = eval("qq{$Lang->{Restore_Options_for__host2}}"); if ( @hosts == 1 ) { # @@ -271,6 +273,8 @@ EOF $host:/$strippedShare$f$In{hostDest}:/$strippedShareDest$targetFile EOF } + $In{shareDest} = decode_utf8($In{shareDest}); + $In{pathHdr} = decode_utf8($In{pathHdr}); my $content = eval("qq{$Lang->{Are_you_sure}}"); Header(eval("qq{$Lang->{Restore_Confirm_on__host}}"), $content); Trailer();