]> git.donarmstrong.com Git - debbugs.git/commitdiff
allow complete sset of RFC2822 comments
authorDon Armstrong <don@donarmstrong.com>
Fri, 28 Aug 2009 23:23:07 +0000 (16:23 -0700)
committerDon Armstrong <don@donarmstrong.com>
Fri, 28 Aug 2009 23:23:07 +0000 (16:23 -0700)
Debbugs/Recipients.pm

index 572f6e758a7a8778b31cdd6cc73e051098ff9634..9421a6008e835c4ea235876f00a862faad472339 100644 (file)
@@ -291,8 +291,13 @@ sub determine_recipients {
                         $level = 'cc';
                    }
               }
-              # strip out all non-word non-spaces
-              $reason =~ s/[^\ \w]//g;
+              # RFC 2822 comments cannot contain specials and
+              # unquoted () or \; there's no reason for us to allow
+              # insane things here, though, so we restrict this even
+              # more to 20-7E ( -~)
+              $reason =~ s/\\/\\\\/g;
+              $reason =~ s/([\)\(])/\\$1/g;
+              $reason =~ s/[^\x20-\x7E]//g;
               push @reasons, $reason . ' for {'.join(',',@bugs).'}';
          }
          if ($param{address_only}) {