]> git.donarmstrong.com Git - debbugs.git/commitdiff
[project @ 2003-05-25 16:26:24 by cjwatson]
authorcjwatson <>
Sun, 25 May 2003 23:26:24 +0000 (15:26 -0800)
committercjwatson <>
Sun, 25 May 2003 23:26:24 +0000 (15:26 -0800)
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.

cgi/bugreport.cgi

index 79c80d4a3663b9ce410fee727d3e9d9259862f77..a0d100b5bb8e0be5bf59ad64f2f2361bd76b19ca 100755 (executable)
@@ -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;