diff options
author | jouni%heikniemi.net <> | 2002-07-11 17:05:05 +0200 |
---|---|---|
committer | jouni%heikniemi.net <> | 2002-07-11 17:05:05 +0200 |
commit | c3bcb9fa74e6409649fe8ea38b6da918ccf807fd (patch) | |
tree | 655b91aa6068b15990e3cf87ec6260920732db0a /processmail | |
parent | 28ffd751b775220f084902ddd74a662baf4051c5 (diff) | |
download | bugzilla-c3bcb9fa74e6409649fe8ea38b6da918ccf807fd.tar.gz bugzilla-c3bcb9fa74e6409649fe8ea38b6da918ccf807fd.tar.xz |
Bug 117297: CC list mailing had case-sensitive dupe checking, making it possible to mail both "a@b.com" and
"a@B.com".
Patch by thomas+mozilla@stromberg.org (Thomas Stromberg), r=jouni,timeless
Diffstat (limited to 'processmail')
-rwxr-xr-x | processmail | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/processmail b/processmail index 37036f279..9ffdc1653 100755 --- a/processmail +++ b/processmail @@ -271,10 +271,14 @@ sub ProcessOneBug { # only need one entry per person my @allEmail = (); my %AlreadySeen = (); + my $checkperson = ""; foreach my $person (@emailList) { - if ( !($AlreadySeen{$person}) ) { + # don't modify the original so it sends out with the right case + # based on who came first. + $checkperson = lc($person); + if ( !($AlreadySeen{$checkperson}) ) { push(@allEmail,$person); - $AlreadySeen{$person}++; + $AlreadySeen{$checkperson}++; } } @@ -366,7 +370,7 @@ sub filterExcludeList ($$) { foreach my $included (@allEmail) { # match found, so we remove the entry - if ($included eq $excluded) { + if (lc($included) eq lc($excluded)) { pop(@result); last; } @@ -374,10 +378,13 @@ sub filterExcludeList ($$) { } # only need one entry per person + my $checkperson = ""; + foreach my $person (@result) { - if ( !($alreadySeen{$person}) ) { + $checkperson = lc($person); + if ( !($alreadySeen{$checkperson}) ) { push(@uniqueResult,$person); - $alreadySeen{$person}++; + $alreadySeen{$checkperson}++; } } |