Closed Bug 1979618 Opened 3 months ago Closed 3 months ago

Thunderbird incorrectly reports that an NNTP message has been sent when servers respond to POST with an authentication request.

Categories

(MailNews Core :: Networking: NNTP, defect)

Thunderbird 96
defect

Tracking

(thunderbird_esr128 wontfix, thunderbird_esr140? affected, thunderbird141 wontfix, thunderbird142? fixed, thunderbird143 fixed)

RESOLVED FIXED
143 Branch
Tracking Status
thunderbird_esr128 --- wontfix
thunderbird_esr140 ? affected
thunderbird141 --- wontfix
thunderbird142 ? fixed
thunderbird143 --- fixed

People

(Reporter: welpy-cw, Assigned: welpy-cw)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

When a cached NNTP client is reused and the underlying TCP connection must be re-established, the NNTP server may request authentication when the POST command is issued. This situation is not handled correctly, as NNTPClient._currentAction, which holds the action to be repeated after authentication, is still set to _actionGroup. The message send code then receives a report of that command's successful completion, giving the impression that the message had been sent when it actually had not.

Assignee: nobody → h.w.forms
Status: NEW → ASSIGNED

Do you have a way to reproduce? When I tried posting after severing the connection on a daily build, it did ask me to reauth.

Two conditions are necessary for the bug to occur:

  1. "Always request authentication when connecting to this server" must be switched off in the server settings.
  2. The connection timeout of 170 seconds introduced in Bug 1901338 must have expired for the reconnect to take place.

This results in the STR:

  • Turn off that setting.
  • Select an article in a newsgroup.
  • Wait at least 170 seconds.
  • Create and send a response without acting elsewhere in the group.

Thank you, Alfred, for the concise instructions. Just some additional hints that may make reproducing easier:

  • Set mailnews.nntp.loglevel as well as mailnews.send.loglevel to All.
  • You can reduce the connection timeout for the NNTP server to something like 30 sec to speed this up, for example mail.server.server2.connection_timeout to 30. Whenever a connection is closed, this is logged with "Expected timeout".

The bug itself happens here with NttpClient._actionGroup instead of the appropriate action as defined in NttpClient.post() being called.

Also you need a news server that requires authentication, so this won't reproduce with news.eternal-september.org for example.

Target Milestone: --- → 143 Branch

Pushed by brendan@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/1cd9c4860ca1
Fix posting an NNTP message when news server requests auth. r=darktrojan

Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED

Comment on attachment 9503259 [details]
Bug 1979618 - Fix posting an NNTP message when news server requests auth. r=#thunderbird-reviewers

Uplift Approval Request

  • Please state case for uplift consideration and ensure bug severity is set: With the fix for Bug 1901338 included in 142, Thunderbird is expected to be much more often in a state where this old bug happens (that is reusing an existing NNTP client that has to reestablish the connection to the server).
  • User impact if declined: Thunderbird gives the impression that a newsgroup posting was successfully sent when it actually failed.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Daily?: Yes
  • Has the fix been verified in Beta?: No
  • Needs manual test from QA?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Very straightforward fix mainly involving internal variables being properly reset, covered by an automated test.
  • Does the fix cause any migrations to be skipped?: No
  • String changes made/needed: None.
Attachment #9503259 - Flags: approval-comm-beta?

Comment on attachment 9503259 [details]
Bug 1979618 - Fix posting an NNTP message when news server requests auth. r=#thunderbird-reviewers

[Triage Comment]
Approved for beta

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

Attachment

General

Created:
Updated:
Size: