next if ! -r $file;
- open( FILE, $file );
+ open( FILE, $file ) or die $!;
$addr = <FILE>;
+ defined $addr or die $!;
chop $addr;
close( FILE );
}
close( NEWSGROUPS );
- open( LOG, ">>$webstump_home/log/webstump.log" );
- print LOG "Call from $ENV{'REMOTE_ADDR'}, QUERY_STRING=$ENV{'QUERY_STRING'}\n";
+ open( LOG, ">>$webstump_home/log/webstump.log" ) or die $!;
+ LOG->autoflush(1);
+ print LOG "Call from $ENV{'REMOTE_ADDR'}, QUERY_STRING=$ENV{'QUERY_STRING'}\n" or die $!;
}
# gets the directory name for the newsgroup
my $sendmail_command = "$sendmail $recipient";
$sendmail_command =~ /(^.*$)/;
$sendmail_command = $1; # untaint
- open_pipe_for_writing( SENDMAIL, "$sendmail_command > /dev/null " );
- print SENDMAIL $message;
- close( SENDMAIL );
+ open_pipe_for_writing( SENDMAIL, "$sendmail_command > /dev/null " )
+ or die $!;
+ print SENDMAIL $message or die $!;
+ close( SENDMAIL ) or die "$? $!";
}
$decision = "reject thread" if $thread_decision eq "ban";
$decision = "approve" if $thread_decision eq "preapprove";
- $decision = "reject abuse" if $poster_decision eq "ban";
- $decision = "approve" if $poster_decision eq "preapprove";
+ #$decision = "reject blocklist" if $poster_decision eq "ban";
+ die if $decision ne "approve" and $poster_decision eq "preapprove";
if( -r $fullpath && open( MESSAGE, "$fullpath" ) ) {
my $RealSubject = "", $From = "", $Subject = "";
if $thread_decision eq "watch";
# Subject, newsgroup, ShortDirectoryName, decision, comment
- &process_approval_decision( $Subject, $newsgroup, $file, $decision, $comment );
+ &process_approval_decision( $Subject, $newsgroup, $file, $decision, $comment, "moderator \U$request{'moderator'}" );
}
}
} elsif( $action eq "change_password" ) {
&authenticate( $newsgroup, $moderator, $password );
&html_change_password;
+ } elsif( $action eq "search_logs" ) {
+ &authenticate( $newsgroup, $moderator, $password );
+ &html_search_logs;
} elsif( $action eq "validate_change_password" ) {
&authenticate( $newsgroup, $moderator, $password );
&validate_change_password;