]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Fix for bug 95857: process_bugs.cgi sees blank address in cc: line (would show up...
authorjustdave%syndicomm.com <>
Sat, 18 Aug 2001 08:49:02 +0000 (08:49 +0000)
committerjustdave%syndicomm.com <>
Sat, 18 Aug 2001 08:49:02 +0000 (08:49 +0000)
Patch by Myk Melez <myk@mozilla.org>
r= justdave@syndicomm.com

process_bug.cgi

index 76e52a2df9c839731296f9b22514d68f944df4d8..5bb180c5a3d500a09c0e51ad6fcc6bfc03c01e8c 100755 (executable)
@@ -582,17 +582,15 @@ if (defined $::FORM{newcc} || defined $::FORM{removecc} || defined $::FORM{massc
     }
 
     if ($cc_add) {
-        foreach my $person (split(/[ ,]/, $cc_add)) {
-            # Ignore blanks
-            next unless $person;
+        $cc_add =~ s/^[\s,]+//; # Remove leading delimiters.
+        foreach my $person ( split(/[\s,]+/, $cc_add) ) {
             my $pid = DBNameToIdAndCheck($person);
             $cc_add{$pid} = $person;
         }
     }
     if ($cc_remove) {
-        foreach my $person (split(/[ ,]/, $cc_remove)) {
-            # Ignore blanks
-            next unless $person;
+        $cc_remove =~ s/^[\s,]+//; # Remove leading delimiters.
+        foreach my $person ( split(/[\s,]+/, $cc_remove) ) {
             my $pid = DBNameToIdAndCheck($person);
             $cc_remove{$pid} = $person;
         }