Bug 110370

Summary: libkmime: MIME checking code does not recognize uuencoded content because of ContentType checking
Product: knode Reporter: Tony Moore <tonywm>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED REMIND    
Severity: normal CC: nive
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: NetBSD   
Latest Commit: Version Fixed In:

Description Tony Moore 2005-08-08 00:54:38 UTC
Version:           0.9.2 (using KDE KDE 3.4.2)
Installed from:    Gentoo Packages
OS:                NetBSD

in kmime_content.cpp:125 the code checks whether the content is Text:

if(ct->isText()) 
       return; //nothing to do

In some messages with UUencoded binaries the content-type is "text/plain" and the body is the data, but this if statement will exit the function rendering the encoded data. 

The other part of code that goes along with this is the code a few lines down:

else if (ct->mimeType()=="invalid/invalid") { //non-mime body => check for uuencoded content

This will only enter if the content-type was set to "text".

I made two changes to fix this problem.

1. Remove the first "if" listed
2. change "else if ..." to "else"
Comment 1 Olivier Trichet 2009-04-24 19:53:35 UTC
Uuencoded messages should not declare a text/plain mime-type.

In fact they usually declare no mime-type at all which, in a MIME world, means text/plain. A change in kmime has been made to always try to uudecode message with no MIME headers.

This should fix parsing of almost every message with uuencoded data.

PS : I know it is a very late reply...