If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

uploading message with mixed line endings in headers can corrupt headers

RESOLVED FIXED

Status

MailNews Core
Networking: IMAP
RESOLVED FIXED
11 years ago
9 years ago

People

(Reporter: Bienvenu, Assigned: Bienvenu)

Tracking

({fixed1.8.1})

Trunk
x86
Windows XP
fixed1.8.1

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

11 years ago
If you upload a message to an imap folder that contains mixed line endings, you can end up with missing/corrupt headers on the imap server. The problem is that the code to find lines assumes the lines are all terminated the same way. Usually this will be true, but I've seen one case where this isn't true : when you have an rss message with a wrapped subject. All the headers lines are \n terminated, but the wrapped subject has a \r\n in it. We were looking for \r lines and if we didn't find any, we looked for \n lines. But this made us miss the headers up to the subject. Fix upcoming...
(Assignee)

Comment 1

11 years ago
Created attachment 233834 [details] [diff] [review]
proposed fix

use strpbrk to find the first /r or /n - this works a lot better in my test cases.
Attachment #233834 - Flags: superreview?(mscott)

Updated

11 years ago
Attachment #233834 - Flags: superreview?(mscott) → superreview+
(Assignee)

Updated

11 years ago
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.