[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#399677: marked as done (patch for incorrect mimedecode case-sensitivity)

Your message dated Sun, 23 Aug 2009 23:42:54 +0100
with message-id <1251067374.156167.9141.nullmailer@kmos.homeip.net>
and subject line Package mimedecode has been removed from Debian
has caused the Debian Bug report #399677,
regarding patch for incorrect mimedecode case-sensitivity
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org

399677: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=399677
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: mimedecode
Version: 1.9-4

mimedecode does not comply with RFC 2045 (MIME), which says:
  The type, subtype, and parameter names are not case sensitive.  For
  example, TEXT, Text, and TeXt are all equivalent top-level media

It's simple to fix: 
  change all 'strstr' to 'strcasestr'
  insert '#define _GNU_SOURCE' before including string.h

See below for an example & a patch.

Brian Keck


An example of a message that's handled incorrectly:

  Date: Wed, 20 Sep 2006 12:42:57 -0700 (PDT)
  From: Trey Harris <trey@lopsa.org>
  To: Larry Wall <larry@wall.org>
  Subject: Re: Capture sigil
  Message-ID: <20060920123318.R34441@bowser.eecs.harvard.edu>
  MIME-Version: 1.0
  Content-Type: MULTIPART/MIXED; BOUNDARY="0-1553921899-1158781316=:34441"
  Content-Type: TEXT/PLAIN; CHARSET=UTF-8; FORMAT=flowed
  Content-Transfer-Encoding: QUOTED-PRINTABLE
  Content-ID: <20060920124244.D34441@bowser.eecs.harvard.edu>
  In a message dated Wed, 20 Sep 2006, Larry Wall writes:
  > The obvious ASCII for =C2=A2 would be c/ or C/ or c| or c| or maybe just =
  I like =C2=A2,but:
      c/$foo # ASCII of =C2=A2$foo
      d/$foo # d() divided by $foo
  is rather confusing.  (Same goes for |).
  So the Term Term exclusion makes me rather lean towards |.  Whether it's
  the canonical sigil or the ASCII of =C2=A2 doesn't much matter to me.
This passes through the current mimedecode unchanged.
It's correctly decoded with the above changes.


A patch to make the changes described above (this applies to
mimedecode.c as produced by 'apt-get source mimedecode'):

> #define _GNU_SOURCE
< 			if (strstr(linebuf, "text/") || strstr(linebuf, "Text/"))
> 			if (strcasestr(linebuf, "text/") )
< 			else if (  strstr(linebuf, "multipart/"))
> 			else if (  strcasestr(linebuf, "multipart/"))
< 			else if (  strstr(linebuf, "message/"))
> 			else if (  strcasestr(linebuf, "message/"))
< 			     && strstr(linebuf, "boundary="))
> 			     && strcasestr(linebuf, "boundary="))
< 			cp = strstr (linebuf, "boundary=");
> 			cp = strcasestr (linebuf, "boundary=");

--- End Message ---
--- Begin Message ---
Version: 1.9-4+rm

You filled the bug http://bugs.debian.org/399677 in Debian BTS
against the package mimedecode. I'm closing it at *unstable*, but it will
remain open for older distributions.

For more information about this package's removal, read
http://bugs.debian.org/354177. That bug might give the reasons why
this package was removed and suggestions of possible replacements.

Don't hesitate to reply to this mail if you have any question.

Thank you for your contribution to Debian.

Marco Rodrigues

--- End Message ---

Reply to: