Fix for bug 95857: process_bugs.cgi sees blank address in cc: line (would show up as __UNKNOWN__)

Patch by Myk Melez <myk@mozilla.org> r= justdave@syndicomm.com
parent c409d069
...@@ -582,17 +582,15 @@ if (defined $::FORM{newcc} || defined $::FORM{removecc} || defined $::FORM{massc ...@@ -582,17 +582,15 @@ if (defined $::FORM{newcc} || defined $::FORM{removecc} || defined $::FORM{massc
} }
if ($cc_add) { if ($cc_add) {
foreach my $person (split(/[ ,]/, $cc_add)) { $cc_add =~ s/^[\s,]+//; # Remove leading delimiters.
# Ignore blanks foreach my $person ( split(/[\s,]+/, $cc_add) ) {
next unless $person;
my $pid = DBNameToIdAndCheck($person); my $pid = DBNameToIdAndCheck($person);
$cc_add{$pid} = $person; $cc_add{$pid} = $person;
} }
} }
if ($cc_remove) { if ($cc_remove) {
foreach my $person (split(/[ ,]/, $cc_remove)) { $cc_remove =~ s/^[\s,]+//; # Remove leading delimiters.
# Ignore blanks foreach my $person ( split(/[\s,]+/, $cc_remove) ) {
next unless $person;
my $pid = DBNameToIdAndCheck($person); my $pid = DBNameToIdAndCheck($person);
$cc_remove{$pid} = $person; $cc_remove{$pid} = $person;
} }
......
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