Closed Bug 1693019 Opened 3 years ago Closed 3 years ago

After displaying a NNTP message with an attached image (JPG, PNG,...), only a download dialog appears when you call up further articles.

Categories

(MailNews Core :: Networking: NNTP, defect, P1)

Thunderbird 86
x86_64
All

Tracking

(thunderbird_esr78 unaffected, thunderbird86 wontfix, thunderbird87 wontfix, thunderbird88 wontfix, thunderbird89 wontfix, thunderbird90+ wontfix, thunderbird91+ verified)

VERIFIED FIXED
92 Branch
Tracking Status
thunderbird_esr78 --- unaffected
thunderbird86 --- wontfix
thunderbird87 --- wontfix
thunderbird88 --- wontfix
thunderbird89 --- wontfix
thunderbird90 + wontfix
thunderbird91 + verified

People

(Reporter: eugenijus.januskevicius, Assigned: darktrojan)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:86.0) Gecko/20100101 Thunderbird/86.0

Steps to reproduce:

In some cases NNTP messages are treated as RFC-822 files and "Open File" dialog is presented instead of displaying the message. It will never be the first message to display when the newsgroup is opened, but may bet the second or the later one.
There is nothing special about these messages. They will be displayed in the message plane when switched back from the other newsgroup.
The bug appeared in TB 86.0b2 and is present in TB 86.0b3.

Actual results:

In some cases "Open File" dialog is presented for RFC-082 MIME data type.

Expected results:

Message should be displayed in the message plane.

Regression?

Component: Untriaged → Networking: NNTP
Flags: needinfo?(thee.chicago.wolf)
Product: Thunderbird → MailNews Core

I mentioned this issue in bug 1690395 comment 7

I didn't see this when I last checked a couple messages at my work PC that's using NNTP. I won't be in the office until Monday but I can check again then if you'd like.

Flags: needinfo?(thee.chicago.wolf)

Test with a message that has an attachment.

I posted one in the mozilla.test.mutimedia newsgroup.

Also occurs for me when viewing posts in alt.binaries.pictures.scenic.

Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Unspecified → All
Hardware: Unspecified → x86_64

I'm not seeing this using 86.0b3 and on my NNTP provider (forteinc.com). I tried with a.b.test. Oddly, things that were posted as yEnc would just show up as yEnc gibberish in the message field and not something which could be saved or prompt to save the message as shown in Comment 0. Some posts that had a .RAR attachment seemed ok though.

You need to test using .jpg or .png attachments.

Try a.b.pictures.scenic No Comment 18663.jpg, then try No Comment 18666 or any posts in that newsgroup.

The first one always displays properly, after that 86.0b3 is useless.

Yup, I can repro with your STR. First one display fine, any subsequent one asks to download. Also the same with the first 87.0b.

Did a quick profile of this issue here: https://share.firefox.dev/2NX3VQO

It's not useless. You can switch a newsgroup to another and return back. The same message will be displayed correctly.
This could be caused by 'Content-Type: multipart/mixed;' messages.

Priority: -- → P1

(In reply to eugenijus.januskevicius from comment #8)

It's not useless. You can switch a newsgroup to another and return back. The same message will be displayed correctly.
This could be caused by 'Content-Type: multipart/mixed;' messages.

Who wants to do that, and I want to move on to the next unread message, not view the same image in the current post in the a.b.pictures.scenic newsgroup.

Some messages with no text in the message, only a .jpg attachment that I view inline, then click the author's description in the followup post.

Can you get a regression window with https://mozilla.github.io/mozregression/ ?

Presumably from tb-fission

Summary: NNTP messages treated as files → NNTP messages with attached .jpg or .png treated as files

(In reply to Wayne Mery (:wsmwk) from comment #11)

Can you get a regression window with https://mozilla.github.io/mozregression/ ?

Alice, would you be able to do that?

Flags: needinfo?(alice0775)

(In reply to Thomas D. (:thomas8) from comment #13)

(In reply to Wayne Mery (:wsmwk) from comment #11)

Can you get a regression window with https://mozilla.github.io/mozregression/ ?

Alice, would you be able to do that?

Please provide detailed STR step by step.

Flags: needinfo?(alice0775)

(In reply to Alice0775 White from comment #14)

Please provide detailed STR step by step.

I have posted an article to mozilla.test:

| Subject: Article with Content-Type: image/jpeg;
| Message-ID: <CZqdnaMVh_l3lWn9nZ2dnUU7-bvNnZ2d@mozilla.org>
| Newsgroups: mozilla.test
| Date: Sun, 18 Jul 2021 12:55:53 +0200

STR:

  • subscribe to news.mozilla.org
  • enable: menu -> View -> Display Attachments Inline
  • enter the group: mozilla.test
  • select the article with the picture
    => the article is displayed correctly!
  • select any other article
    => bug: the download request pops up
Summary: NNTP messages with attached .jpg or .png treated as files → After displaying an NNTP message with an attached image (JPG, PNG,...), only a download dialog appears when you call up further articles.
Summary: After displaying an NNTP message with an attached image (JPG, PNG,...), only a download dialog appears when you call up further articles. → After displaying a NNTP message with an attached image (JPG, PNG,...), only a download dialog appears when you call up further articles.

It's pretty much caused by Bug 1687847.

https://bugzilla.mozilla.org/attachment.cgi?id=9200577

https://searchfox.org/comm-central/rev/74693e927d8a79338c0a0aa5359e4ed5a8a32158/mailnews/news/src/nsNntpService.cpp#1199
| rv = channel->SetContentDisposition(nsIChannel::DISPOSITION_ATTACHMENT);

The disposition status is stored in the 'channel' object <SIC!>. But I don't see that the status is reset anywhere.

And since the TB reuses the 'channel' object for the next NNTP article, the wrong status remains.

Regressed by: 1687847

There's only two options for disposition. If it's not an attachment, set inline disposition to clear the previous value. We shouldn't be reusing channels like this, but apparently we are.

Assignee: nobody → geoff
Status: NEW → ASSIGNED

I don't know if this actually works, as I have no way to test it, but it should. I've started a Try build with this change:
https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=c39a03b52ccc5565749f9a6c26ad99a1228fe780

Thanks Alfred for investigating.

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/1451e2db7925
Set nsNntpMockChannel content disposition to inline for everything except attachments. r=rnons

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 92 Branch

Comment on attachment 9231787 [details]
Bug 1693019 - Set nsNntpMockChannel content disposition to inline for everything except attachments. r=rnons

[Approval Request Comment]
Regression caused by (bug #): 1687847
User impact if declined:
Testing completed (on c-c, etc.):
Risk to taking this patch (and alternatives if risky):
Fixes regression

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

Comment on attachment 9231787 [details]
Bug 1693019 - Set nsNntpMockChannel content disposition to inline for everything except attachments. r=rnons

[Triage Comment]
Approved for beta

Walt, can you test to verify this is fixed when beta ships?

Flags: needinfo?(wls220spring)
Attachment #9231787 - Flags: approval-comm-beta? → approval-comm-beta+

Fixed in 91.0b4 on Fedora 34 Workstation, Gnome desktop, and Windows 10.

I still see bug 1690395 with all file types.

Status: RESOLVED → VERIFIED
Flags: needinfo?(wls220spring)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: