Bug 312276 - removing (deleting) an attachment loses the email contents as well for some mails
Summary: removing (deleting) an attachment loses the email contents as well for some m...
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: commands and actions (show other bugs)
Version: 4.14.0
Platform: openSUSE Linux
: HI grave
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 321063 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-12-27 19:51 UTC by Bernhard E. Reiter
Modified: 2015-03-19 12:37 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.14.6


Attachments
Test email1 showing the problem (1.94 KB, application/octet-stream)
2012-12-27 20:22 UTC, Bernhard E. Reiter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard E. Reiter 2012-12-27 19:51:26 UTC
On one of my emails I lose the contents of the email when deleting  an jpg attachment. Expected behaviour is to just remove the image attachment
and leave the other attachments alone.

The result after using the "remove attachment" option from the context
menu is: You deleted an attachment from this message. The original MIME headers for the attachment were:
Content-Type: image/pjpeg
name="XYZ"
filename="XYZ"

The email is not public, here is a description of its structure:
MIME-Version: 1.0
Content-Type: multipart/mixed;

Content-Type: multipart/alternative

Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Content-Type: image/pjpeg;
  name="XYZ"



rpm -qi kontact
Version     : 4.9.4
Release     : 1.1
Architecture: x86_64
Signature   : DSA/SHA1, Sa 01 Dez 2012 12:01:24 CET, Key ID 27c070176f88bb2f
Source RPM  : kdepim4-4.9.4-1.1.src.rpm
Build Date  : Sa 01 Dez 2012 11:53:12 CET
Vendor      : obs://build.opensuse.org/KDE



Reproducible: Always




I go to major, because if this action is used, the contents of the email
is lost and cannot be recovered.
Comment 1 Bernhard E. Reiter 2012-12-27 20:22:38 UTC
Created attachment 76044 [details]
Test email1 showing the problem

Import test email1 from the mbox, click once on the email to see the body message, click somewhere else, now show the email use the context menu
on the image and "remove attachment" action. Confirm the question
and see that the content of the email is gone instead.
Comment 2 Laurent Montel 2012-12-28 06:51:21 UTC
I confirm it.
Comment 3 Bernhard E. Reiter 2014-09-19 08:15:46 UTC
Conforming the problem is still there with

Source RPM  : kdepim4-4.14.1-1.2.src.rpm
Distribution: KDE:Current / openSUSE_13.1
Architecture: x86_64

Upgrading importance to HI and severity to grave as this is loss of data
and the email really is gone.
Comment 4 Bernhard E. Reiter 2014-09-19 08:17:06 UTC
If it cannot be fixed the function for deleting an attachment should be disabled temporarily to prevent data loss.
Comment 5 Erik Quaeghebeur 2015-02-13 09:15:24 UTC
It seems bug 333150 is a duplicate of this. Please mark it as such and have a look at the comments there, as I analyzed the problem and found it seems to occur only with a specific MIME structure. This should be easy to fix and should be a priority, as it leads to data loss.
Comment 6 Laurent Montel 2015-02-14 13:18:12 UTC
Git commit e9b653b1389bd7afc38b0e7effa5c511264a002f by Montel Laurent.
Committed on 14/02/2015 at 13:17.
Pushed by mlaurent into branch 'KDE/4.14'.

Fix Bug 312276 - removing (deleting) an attachment loses the email contents as well for some mails

FIXED-IN: 4.14.6
Related: bug 333150

It needs kdepim too

M  +52   -28   kmime/kmime_content.cpp
M  +2    -0    kmime/kmime_content.h

http://commits.kde.org/kdepimlibs/e9b653b1389bd7afc38b0e7effa5c511264a002f
Comment 7 Nico Kruber 2015-03-19 12:37:04 UTC
*** Bug 321063 has been marked as a duplicate of this bug. ***