Bug 378007 - Cannot display attached files for some weird content-type
Summary: Cannot display attached files for some weird content-type
Status: RESOLVED WORKSFORME
Alias: None
Product: kmail2
Classification: Applications
Component: commands and actions (show other bugs)
Version: 5.4.3
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-24 10:10 UTC by Éric Brunet
Modified: 2022-12-06 05:19 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Éric Brunet 2017-03-24 10:10:33 UTC
I am reading some email with a pdf file attached.

If I save the pdf in my home dir, I can open it without problem
If I click on the attachment to open it from kmail, I have some display bugs.

In fact, the temporary pdf file in /tmp/kde-*/kmail2*/ is corrupted; it is shorter than it should be. In fact, after a more careful look, every sequence of CRLF (0x0d 0x0a) has been replaced by LF (0x0a) in the binary pdf file, as
though dos2unix -f had been run on it.

In the email, I have the following contents-line for the attachment:

--------------050809070702050207010502
Content-Type: =?windows-1252?q?application/pdf;
 name="XXX.pdf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="XXX.pdf"

Notice the windows-1252. For another mail where the Content-Type is

Content-Type: application/x-pdf;

then everything works perfectly.

I am not familiar with mime rules, and possibly the email I was sent is faulty.
But kmail should know enough to not run filters designed for text files on binary files.

When googling the problem, I see that thunderbird had the same problem six years ago; see https://bugzilla.mozilla.org/show_bug.cgi?id=659355
Comment 1 Éric Brunet 2017-03-24 13:40:41 UTC
I have just checked on a more uptodate computer. The bug is still present in kmail 5.4.2 and kmail 5.4.3. I am updating the version, and removing the typo in the title
Comment 2 Laurent Montel 2017-06-15 05:57:05 UTC
I confirm it. 
I already created some autotests.
I need to understand where is the bug.
Comment 3 Justin Zobel 2022-11-06 09:24:37 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 4 Bug Janitor Service 2022-11-21 05:12:40 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Bug Janitor Service 2022-12-06 05:19:15 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!