X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scripts%2Fprocess.in;h=dcd845a025edd01651e82289e63b01d23dbac46c;hb=00ee0147756121b6feeff5fa9d067d03e987e73e;hp=43387b27ec4e74f95c134f369f960c1000fcb3d8;hpb=63d0a5c3c505331e45a4ea47b33e0e7560d2117a;p=debbugs.git diff --git a/scripts/process.in b/scripts/process.in index 43387b2..dcd845a 100755 --- a/scripts/process.in +++ b/scripts/process.in @@ -12,10 +12,15 @@ use Debbugs::Mail qw(send_mail_message encode_headers); use Debbugs::Packages qw(getpkgsrc); use Debbugs::User qw(read_usertags write_usertags); +use Debbugs::CGI qw(html_escape); + +use Debbugs::Log qw(:misc); + # TODO DLA; needs config reworking and errorlib reworking # use warnings; # use strict; +use Debbugs::Status qw(:versions); use Debbugs::Config qw(:globals); my $lib_path = $gLibPath; @@ -149,7 +154,7 @@ for my $phline (@bodylines) print DEBUG ">$fn|$fv|\n"; $fn = lc $fn; # Don't lc owner or forwarded - $fv = lc $fv unless $fh =~ /^(?:owner|forwarded|usertags)$/; + $fv = lc $fv unless $fh =~ /^(?:owner|forwarded|usertags|version|source-version)$/; $pheader{$fn} = $fv; print DEBUG ">$fn~$fv<\n"; } @@ -669,7 +674,7 @@ END $user_tags{$tag} = [keys %bugs_with_tag]; } } - write_usertags(\%usertags,$user); + write_usertags(\%user_tags,$user); } else { $brokenness .=<$gBug#$ref". - (length($data->{package})? "; Package ".&sani($data->{package})."" : ''). + (length($data->{package})? "; Package ".html_escape($data->{package})."" : ''). "."); &sendmessage(<$gBug#$ref". - (length($data->{package}) ? "; Package ".&sani($data->{package})."" : ''). + (length($data->{package}) ? "; Package ".html_escape($data->{package})."" : ''). "."); } else { &htmllog($newref ? "Report" : "Information", "stored", "", "$gBug#$ref". - (length($data->{package}) ? "; Package ".&sani($data->{package})."" : ''). + (length($data->{package}) ? "; Package ".html_escape($data->{package})."" : ''). "."); } &sendmessage(<\n".&sani($brokenness)."\n

\n" : ''; +$htmlbreak= length($brokenness) ? "

\n".html_escape($brokenness)."\n

\n" : ''; $htmlbreak =~ s/\n\n/\n

\n\n/g; if (length($resentccval)) { - $htmlbreak = " Copy sent to ".&sani($resentccval).".". + $htmlbreak = " Copy sent to ".html_escape($resentccval).".". $htmlbreak; } unless (exists $header{'x-debbugs-no-ack'}) { @@ -1066,7 +1071,7 @@ sub appendlog { print DEBUG "failed open log err $!<\n"; &quit("opening db-h/$hash/$ref.log (li): $!"); } - print(AP "\7\n",@{escapelog(@log)},"\n\3\n") || &quit("writing db-h/$hash/$ref.log (li): $!"); + print(AP "\7\n",escape_log(@log),"\n\3\n") || &quit("writing db-h/$hash/$ref.log (li): $!"); close(AP) || &quit("closing db-h/$hash/$ref.log (li): $!"); } @@ -1087,7 +1092,7 @@ sub htmllog { print(AP "\6\n". "$whatobj $whatverb". - ($where eq '' ? "" : " to ".&sani($where).""). + ($where eq '' ? "" : " to ".html_escape($where).""). ":
\n". $desc. "\n\3\n") || &quit("writing db-h/$hash/$ref.log (lh): $!"); close(AP) || &quit("closing db-h/$hash/$ref.log (lh): $!"); @@ -1150,7 +1155,7 @@ sub sendmessage { #save email to the log open(AP,">>db-h/$hash/$ref.log") || &quit("opening db-h/$hash/$ref.log (lo): $!"); print(AP "\2\n",join("\4",@$recips),"\n\5\n", - @{escapelog(stripbccs($msg))},"\n\3\n") || + escape_log(stripbccs($msg)),"\n\3\n") || &quit("writing db-h/$hash/$ref.log (lo): $!"); close(AP) || &quit("closing db-h/$hash/$ref.log (lo): $!");