Closed Bug 1763974 Opened 2 years ago Closed 2 years ago

"Download the rest of the message" broken in JS POP3 implementation (with non-alphanumeric UIDLs)

Categories

(MailNews Core :: Networking: POP, defect)

Thunderbird 100
defect

Tracking

(thunderbird_esr91 unaffected, thunderbird100 fixed)

VERIFIED FIXED
101 Branch
Tracking Status
thunderbird_esr91 --- unaffected
thunderbird100 --- fixed

People

(Reporter: newsfan, Assigned: rnons)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Steps to reproduce:

Thunderbird has to ways of only partly downloading a message. In the account settings under "Server Settings" there is "Fetch headers only" and under "Disk Space" there is "... do not download: Messages larger than ...".

Both are currently broken. In the first case, this is displayed in the message body:
Not Downloaded
Only the headers for this message were downloaded from the mail server.
Download the rest of the message.

In the second case it's:
Truncated!
This message exceeded the Maximum Message Size set in Account Settings, so we have only downloaded the first few lines from the mail server.
Download the rest of the message.

Actual results:

Clicking the "Download the rest of the message" link has no effect.

Expected results:

Clicking the "Download the rest of the message" link should download the rest of the message.

Note: It still works with the C++ module.

Flags: needinfo?(remotenonsense)

Sorry, typo in the first sentence: Thunderbird has two ways ...

In absence of a test, this function breaks periodically: https://mzl.la/3LSDuo3 and https://mzl.la/3rgMStI

Seems to work for me, can you set mailnews.pop3.loglevel to All, and get some logs? Thanks.

Flags: needinfo?(remotenonsense)

Nothing significant in the log. Clicking the "Download the rest of the message" link results in:

01:36:09.900 mailnews.pop3: Connecting to pop://mail.some-server.com:995 serverBusy=false Pop3Client.jsm:121:18
01:36:09.945 mailnews.pop3: Connected Pop3Client.jsm:244:18
01:36:10.121 mailnews.pop3: S: +OK POP3 perditon ready on ::ffff:192.168.0.14 0003fbd0 Pop3Client.jsm:285:18
01:36:10.126 mailnews.pop3: C: QUIT Pop3Client.jsm:397:20
01:36:10.166 mailnews.pop3: S: +OK QUIT Pop3Client.jsm:285:18
01:36:10.168 mailnews.pop3: Connection closed. Pop3Client.jsm:308:18

Seemingly there is no attempt to download anything despite the "Loading message ..." display in the status bar.

Testing on TB 100 beta 1.

Seems it early returned at https://searchfox.org/comm-central/rev/13a350796cd3b395cf511245c91aea751382d9fc/mailnews/local/src/Pop3Client.jsm#191-193

Can you go to your profile folder, open Mail/pop3.hostname/popstate.dat, you should see something like

b 0000008f5fbc57c0 1649722738

b is a flag we set when too big or fetch only headers, 0000008f5fbc57c0 is the unique UIDL. Select View > Headers > All to show the UIDL of the current message.

popstate.dat has

b 1649723458.M399697P21392.www180.some-server.com,S=2767,W=2830 1649723470

and the header is:

X-UIDL: 1649723458.M399697P21392.www180.some-server.com,S=2767,W=2830

The uidl is also part of the link URL, but it's encoded there:
uidl=1649723458.M399697P21392.www180.some-server.com%2CS%3D2767%2CW%3D2830

Maybe that throws your map lookup?
https://searchfox.org/comm-central/rev/13a350796cd3b395cf511245c91aea751382d9fc/mailnews/local/src/Pop3Client.jsm#182
Add some decodeURIComponent()?

Assignee: nobody → remotenonsense
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Target Milestone: --- → 101 Branch

Pushed by nicolai@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/0baa1206385c
Fix parsing UIDL when fetching partial message in pop3-js. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED

Can you get this fixed in beta?

Summary: "Download the rest of the message" broken in JS POP3 implementation → "Download the rest of the message" broken in JS POP3 implementation (with non-alphanumeric UIDLs)

Comment on attachment 9271837 [details]
Bug 1763974 - Fix parsing UIDL when fetching partial message in pop3-js. r=mkmelin

[Approval Request Comment]
Regression caused by (bug #): bug 1707548
User impact if declined: Download partial message doesn't work for some POP3 servers.
Testing completed (on c-c, etc.): c-c
Risk to taking this patch (and alternatives if risky): low

Attachment #9271837 - Flags: approval-comm-beta?

Comment on attachment 9271837 [details]
Bug 1763974 - Fix parsing UIDL when fetching partial message in pop3-js. r=mkmelin

[Triage Comment]
Approved for beta

Attachment #9271837 - Flags: approval-comm-beta? → approval-comm-beta+

Working now, thanks.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: