From: cjwatson <> Date: Sun, 25 May 2003 23:26:24 +0000 (-0800) Subject: [project @ 2003-05-25 16:26:24 by cjwatson] X-Git-Tag: release/2.6.0~890 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=1430149a611cd510db36c69a3abe5d4ba4d486d0;p=debbugs.git [project @ 2003-05-25 16:26:24 by cjwatson] Some people (e.g. #10486) seem to think it's a bright idea to use "Content-Type: text". Although that's not valid, pretend it's text/plain anyway since it's unlikely they managed to construct anything particularly exciting. --- diff --git a/cgi/bugreport.cgi b/cgi/bugreport.cgi index 79c80d4a..a0d100b5 100755 --- a/cgi/bugreport.cgi +++ b/cgi/bugreport.cgi @@ -74,7 +74,7 @@ sub display_entity ($$$$\$\@) { $$this .= "\n"; } - unless (($top and $type =~ m[^text/plain(?:;|$)]) or + unless (($top and $type =~ m[^text(?:/plain)?(?:;|$)]) or ($type =~ m[^multipart/])) { push @$attachments, $entity; my @dlargs = ($ref, "msg=$xmessage", "att=$#$attachments"); @@ -98,7 +98,7 @@ sub display_entity ($$$$\$\@) { } return if $disposition eq 'attachment' and not defined($att); - return unless ($type =~ m[^text/] and $type !~ m[^text/html(?:;|$)]) or + return unless ($type =~ m[^text/?] and $type !~ m[^text/html(?:;|$)]) or $type =~ m[^application/pgp(?:;|$)] or $entity->is_multipart;