From b1475869e85882a164576942e68ea2e40074d145 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Fri, 28 Aug 2009 16:23:07 -0700 Subject: [PATCH] allow complete sset of RFC2822 comments --- Debbugs/Recipients.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Debbugs/Recipients.pm b/Debbugs/Recipients.pm index 572f6e7..9421a60 100644 --- a/Debbugs/Recipients.pm +++ b/Debbugs/Recipients.pm @@ -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}) { -- 2.39.2