Closed Bug 1883760 Opened 1 years ago Closed 1 years ago

Receiving new Mails from Server gets stuck - if chunks of multiline response arrive without crlf (only newline)

Categories

(MailNews Core :: Networking: POP, defect)

Thunderbird 115
defect

Tracking

(thunderbird_esr115+ fixed, thunderbird124 wontfix)

RESOLVED FIXED
125 Branch
Tracking Status
thunderbird_esr115 + fixed
thunderbird124 --- wontfix

People

(Reporter: bugzilla22, Assigned: mkmelin)

References

(Regression)

Details

(Keywords: regression, Whiteboard: [regression: 102])

Attachments

(1 file)

Steps to reproduce:

Trying to read mails via pop3 from an existing account having 15000+ Mails on server after having set up thunderbird newls.
Only reading header from Mail server.

Actual results:

after a few 1000+ mails suddently the message reading stops.
This alwas happens in case the final '\n' of the message is transmit in a new tcp package.
e.g.
TCP package 1 "....\r\n.\r"
TCP package 2 "\n"

In this case the last TCP package containing the end of the transmission is not parsed and as the server does not send anything more a timeout error happens and thunderbird stops fetching any further mails from that acocunt.

The issue lies in Pop3Client.jsm _onData function and was introduced the fix of Bug 1774732 / revision 36198 which adds:
if (stringPayload.includes("\r\n")) {
Here the parsing of a data chunk is started only in case the data contains "\r\n". If the "\r" was received in the first data chunk together with other "\r\n" the data would be parsed. The next data chunk containing only a sinlge "\n" will never be parsed.
Chaning this line into
if (stringPayload.includes("\n")) {
fixes this issue, as tested with a local build

Expected results:

All mails shall be read from a server independant how they are transmitted in tcp packages

Component: Untriaged → Networking: POP
Product: Thunderbird → MailNews Core
See Also: → 1878661
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
Regressed by: 1774732
Summary: Receiving new Mails from Server gets stuck → Receiving new Mails from Server gets stuck - if chunks of multiline response arrive without crlf (only newline)
Duplicate of this bug: 1878661
See Also: 1878661
Assignee: nobody → mkmelin+mozilla
Status: NEW → ASSIGNED
Target Milestone: --- → 125 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/5c2463c9c29c
Allow chunks of pop3 multiline response to arrive without crlf (only newline). r=freaktechnik

Status: ASSIGNED → RESOLVED
Closed: 1 years ago
Resolution: --- → FIXED
Whiteboard: [regression: 102]

Comment on attachment 9389894 [details]
Bug 1883760 - Allow chunks of pop3 multiline response to arrive without crlf (only newline). r=freaktechnik

[Approval Request Comment]
User impact if declined: pop3 download can get stuck downloading
Testing completed (on c-c, etc.): c-c, beta 125
Risk to taking this patch (and alternatives if risky): fairly safe

Attachment #9389894 - Flags: approval-comm-esr115?
Duplicate of this bug: 1887070

Comment on attachment 9389894 [details]
Bug 1883760 - Allow chunks of pop3 multiline response to arrive without crlf (only newline). r=freaktechnik

[Triage Comment]
Approved for esr115

Attachment #9389894 - Flags: approval-comm-esr115? → approval-comm-esr115+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: