From: cjwatson <> Date: Sat, 21 Jun 2003 01:13:01 +0000 (-0800) Subject: [project @ 2003-06-20 18:13:01 by cjwatson] X-Git-Tag: release/2.6.0~859 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=9c3cfe2e312ed69a0a9a4f7bcacf274975ad442f;p=debbugs.git [project @ 2003-06-20 18:13:01 by cjwatson] By default, the MIME-tools treat message/* parts as singlepart messages but nevertheless implement the parts() method for them so that you can drill down into the nested messages. Until now we were just displaying an attachment link for message/* but not the actual message, which was a bit unhelpful. Instead, we now decode and display the inner message within a
tag. (Test case first spotted at nCipher, but see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=93268&msg=60 for an example.) --- diff --git a/cgi/bugreport.cgi b/cgi/bugreport.cgi index a0d100b5..9ee2e2a6 100755 --- a/cgi/bugreport.cgi +++ b/cgi/bugreport.cgi @@ -100,7 +100,7 @@ sub display_entity ($$$$\$\@) { return if $disposition eq 'attachment' and not defined($att); return unless ($type =~ m[^text/?] and $type !~ m[^text/html(?:;|$)]) or $type =~ m[^application/pgp(?:;|$)] or - $entity->is_multipart; + $entity->parts; if ($entity->is_multipart) { my @parts = $entity->parts; @@ -109,6 +109,16 @@ sub display_entity ($$$$\$\@) { $$this, @$attachments); $$this .= "\n"; } + } elsif ($entity->parts) { + # We must be dealing with a nested message. + $$this .= "
\n"; + my @parts = $entity->parts; + foreach my $part (@parts) { + display_entity($part, $ref, 1, $xmessage, + $$this, @$attachments); + $$this .= "\n"; + } + $$this .= "
\n"; } else { $$this .= htmlsanit($entity->bodyhandle->as_string) unless ($terse); } diff --git a/debian/changelog b/debian/changelog index 482deb4b..bf121341 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +debbugs (2.4.2) UNRELEASED; urgency=low + + * Colin Watson: + - Add (slightly) fancy CGI decoding of message/* MIME types. + + -- Colin Watson Fri, 20 Jun 2003 18:57:25 +0100 + debbugs (2.4.1) unstable; urgency=low * Colin Watson: