Closed Bug 738284 Opened 12 years ago Closed 12 years ago

PDF corrupted when send from V11 and opened directly from Reader UI (Content-Type: =?iso-8859-1?q?application/pdf; is sent by Tb)

Categories

(Thunderbird :: Message Reader UI, defect)

10 Branch
x86
macOS
defect
Not set
major

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 659355

People

(Reporter: fabien.michel, Unassigned)

References

(Depends on 1 open bug)

Details

Attachments

(3 files)

Attached file Sans nom 1.pdf
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:10.0.3) Gecko/20100101 Firefox/10.0.3
Build ID: 20120309135702

Steps to reproduce:

On Fresh TB 10.0.3 or 11 install.
Create standard IMAP/SMTP account.
Send a mail plain/text with simple pdf attachment (for exemple the joined pdf file) to yourself (but can be another email address)
When mail received,
Select it in Message list,
then in Reader UI single click on attachement at bottom of message to open it. (With Preview.app)






Actual results:

Preview.app can't open the pdf file.
When i open the pdf file with a simple text editor i get this :


<div class="moz-text-plain" wrap=true graphical-quote=true style="font-family: -moz-fixed"><pre wrap>
My message body.
</pre></div>

I have tried theses combinaisons :
Sender -> Receiver : OK / NOK

TB V 10.0.3  -> TB V 10.0.3 : NOK
TB V 10.0.3  -> TB 3.1.20 : NOK
TB V 10.0.3  -> RoundCube : OK
TB V 10.0.3  -> Gmail : OK
TB V 3.1.20  -> TB V 3.1.20 : OK
TB V 3.1.20  -> TB V 10.0.3 : OK

In attachement you will find the same message(code source) sent from TB 3.1.20 and TB V10.0.3 and received by TB V10.0.3

This does not occure when i right click on attachment and save it to disk.
Attached file Sent from TB 10
Attached file Sent from TB 3.1.20
Severity: normal → major
The main difference between theses two messages (source code) is the Content-Type line in attachment part :

Sent from TB 10 :
Content-Type: =?iso-8859-1?q?application/pdf;

Sent from TB 3.1.20 :
Content-Type: application/pdf;
After another test, that work with TB 9
It seems that something is corrupting your mimetypes.rdf how are pdf defined in the version of TB that doesn't work ?
looks like bug 659355 ?
Same phenomenon as all or one of bug 580971, bug 659355, bug 685112, which is caused by bug 503309. See bug 503309 and dependency tree for bug 503309.
Summary: PDF corrupted when send from V11 and opened directly from Reader UI → PDF corrupted when send from V11 and opened directly from Reader UI (Content-Type: =?iso-8859-1?q?application/pdf; is sent by Tb)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Notepad shows following data when the pdf attachment is opened by notepad.exe from recent Tb trunk.
> <div class="moz-text-plain" wrap=true graphical-quote=true style="font-family: -moz-fixed"><pre wrap>
Mon corps de message.
> </pre></div>
Phenomenon with broken Content-Type: is still same as bug 685112.
My RFC-lawyer skills are a bit rusty, but it looks to me like a combination of https://tools.ietf.org/html/rfc2045#section-5.1 and https://tools.ietf.org/html/rfc2047#section-5 implies that encoded-word is *not* allowed in the "application/whatever" portion of the Content-Type header; the extensions discussed in https://tools.ietf.org/html/rfc2231 only apply to the parameter values. This issue is also discussed in the comments on bug 486682.

Bug 685112 and bug 503309 imply that we're getting those invalid header fields from some other sender and then recording them in our mimetypes.rdf; do we know which client is generating the invalid content-type fields in the first place? Is there any evidence that Thunderbird is generating them?
For "Preview.app can't open the pdf file." part, fix was proposed to Bug 659355, closing as DUP.
Status: NEW → RESOLVED
Closed: 12 years ago
No longer depends on: 739025
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: