X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=lib%2FBackupPC%2FCGI%2FView.pm;h=f6cc6376f827f0343d04c26cf814833d2e5ef3d0;hb=546f9691f118c9ea2d164f377994b4a018a60d02;hp=31960861665da5ffc5cff2cd43f9bbab530c5e9f;hpb=3ae3b7557db4829ebfc6f580ceac30376717db6a;p=BackupPC.git diff --git a/lib/BackupPC/CGI/View.pm b/lib/BackupPC/CGI/View.pm index 3196086..f6cc637 100644 --- a/lib/BackupPC/CGI/View.pm +++ b/lib/BackupPC/CGI/View.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 2.1.0_CVS, released 13 Mar 2004. +# Version 2.1.0, released 20 Jun 2004. # # See http://backuppc.sourceforge.net. # @@ -97,7 +97,7 @@ sub action $file = "$TopDir/log/LOG$ext"; $linkHosts = 1; } - if ( !$Privileged ) { + if ( $type ne "docs" && !$Privileged ) { ErrorExit($Lang->{Only_privileged_users_can_view_log_or_config_files}); } if ( !-f $file && -f "$file.z" ) { @@ -186,16 +186,16 @@ sub action last if ( $s eq "" ); $s =~ s/[\n\r]+//g; # remove any passwords and user names - $s =~ s/(SmbSharePasswd.*=.*['"]).*(['"])/$1$2/ig; - $s =~ s/(SmbShareUserName.*=.*['"]).*(['"])/$1$2/ig; - $s =~ s/(RsyncdPasswd.*=.*['"]).*(['"])/$1$2/ig; - $s =~ s/(ServerMesgSecret.*=.*['"]).*(['"])/$1$2/ig; + $s =~ s/(SmbSharePasswd.*=.*['"]).*(['"])/$1****$2/ig; + $s =~ s/(SmbShareUserName.*=.*['"]).*(['"])/$1****$2/ig; + $s =~ s/(RsyncdPasswd.*=.*['"]).*(['"])/$1****$2/ig; + $s =~ s/(ServerMesgSecret.*=.*['"]).*(['"])/$1****$2/ig; $s = ${EscHTML($s)}; $s =~ s[(\$Conf\{.*?\})][ my $c = $1; my $s = lc($c); $s =~ s{(\W)}{sprintf("%%%02x", ord($1) )}gxe; - "$c" + "$c" ]eg; $c .= $s . "\n"; } @@ -216,7 +216,7 @@ sub action return $c; }; # - # Documentation a different header and no pre or post text, + # Documentation has a different header and no pre or post text, # so just handle it here # Header($Lang->{BackupPC__Documentation}, "", 0, $contentSub);