Commit c3bcb9fa authored by jouni%heikniemi.net's avatar jouni%heikniemi.net

Bug 117297: CC list mailing had case-sensitive dupe checking, making it possible…

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
parent 28ffd751
...@@ -271,10 +271,14 @@ sub ProcessOneBug { ...@@ -271,10 +271,14 @@ sub ProcessOneBug {
# only need one entry per person # only need one entry per person
my @allEmail = (); my @allEmail = ();
my %AlreadySeen = (); my %AlreadySeen = ();
my $checkperson = "";
foreach my $person (@emailList) { 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); push(@allEmail,$person);
$AlreadySeen{$person}++; $AlreadySeen{$checkperson}++;
} }
} }
...@@ -366,7 +370,7 @@ sub filterExcludeList ($$) { ...@@ -366,7 +370,7 @@ sub filterExcludeList ($$) {
foreach my $included (@allEmail) { foreach my $included (@allEmail) {
# match found, so we remove the entry # match found, so we remove the entry
if ($included eq $excluded) { if (lc($included) eq lc($excluded)) {
pop(@result); pop(@result);
last; last;
} }
...@@ -374,10 +378,13 @@ sub filterExcludeList ($$) { ...@@ -374,10 +378,13 @@ sub filterExcludeList ($$) {
} }
# only need one entry per person # only need one entry per person
my $checkperson = "";
foreach my $person (@result) { foreach my $person (@result) {
if ( !($alreadySeen{$person}) ) { $checkperson = lc($person);
if ( !($alreadySeen{$checkperson}) ) {
push(@uniqueResult,$person); push(@uniqueResult,$person);
$alreadySeen{$person}++; $alreadySeen{$checkperson}++;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment