X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scripts%2Fprocess;h=4e4d97afbe816f002b0adb941aa2282733221ccd;hb=e71013e25c1ca334b986e28f1caebb6b0cb69cb7;hp=4944768dfd91dbfd2c79f7522e241a94663921ca;hpb=f13b9b4b919d80e6e90acf905452f8788e2b8c40;p=debbugs.git diff --git a/scripts/process b/scripts/process index 4944768..4e4d97a 100755 --- a/scripts/process +++ b/scripts/process @@ -30,7 +30,7 @@ use Debbugs::Text qw(:templates); use Debbugs::Config qw(:globals :config); -use Debbugs::Control qw(append_action_to_log); +use Debbugs::Control qw(append_action_to_log valid_usertag); use Debbugs::Control::Service qw(valid_control control_line); use Debbugs::Recipients qw(determine_recipients); use Encode qw(encode_utf8 decode); @@ -700,8 +700,9 @@ if ($ref<0) { # new bug report $data->{msgid} = $header{'message-id'}; writebug($ref, $data); # Deal with usertags - my $current_user = $replyto; - for my $field (@usertags_bits) { + my $current_user; + unshift @usertag_bits, ['user', $replyto]; + for my $field (@usertag_bits) { my ($name, $value) = @$field; if ($name eq 'user') { my $user = $value; @@ -722,7 +723,7 @@ if ($ref<0) { # new bug report read_usertags(\%user_tags, $current_user); $value =~ s/(?:^\s+|\s+$)//g; for my $tag (split /[,\s]+/, $value) { - if ($tag =~ /^[a-zA-Z0-9.+\@-]+/) { + if (valid_usertag($tag)) { my %bugs_with_tag; @bugs_with_tag{@{$user_tags{$tag}||[]}} = (1) x @{$user_tags{$tag}||[]}; $bugs_with_tag{$ref} = 1;