Closed Bug 1770594 Opened 2 years ago Closed 2 years ago

For an NNTP account, the Pref: mail.server.<serverID>.userName makes TB ask for the credentials at every startup

Categories

(Thunderbird :: Account Manager, defect)

Thunderbird 91
defect

Tracking

(thunderbird_esr102 fixed, thunderbird106 affected)

RESOLVED FIXED
107 Branch
Tracking Status
thunderbird_esr102 --- fixed
thunderbird106 --- affected

People

(Reporter: infofrommozilla, Assigned: rnons)

References

Details

Attachments

(1 file)

STR:

  1. Create a NNTP account "Usenet-Test".
  2. Log in the to ensure functionality.
  3. Open the "Advanced Preferences" and search for the server Foo to identify the server ID.
    E.G.: mail.server.server4.name: "Usenet-Test"
    <serverID> = "server4"
  4. Create a new string pref with your server ID: mail.server.<serverID>.userName
    Set the value to the user name.
  5. Restart TB
  6. Access the NNTP account.

Result: TB asks for the login data although they are correctly stored in the Password Manager.
It does not help to enable "Use Password Manager", nor to delete the old entry there.

The UserName pref has no real purpose on an NNTP server and should therefore not be set. But if it does exist, it must not trigger this side effect.

I noticed this bug because on my TB trunk the fix of bug 1483485 converted an ancient realUserName pref into the userName pref.
The problem with the userName Pref can already be reproduced with the TB91.

See Also: → 1483485, 1769270
Blocks: 1573690

I set mail.server.server4.userName in config editor, but didn't see an auth prompt. Do you by any chance have set mail.server.*.always_authenticate to true?

The UserName pref has no real purpose on an NNTP server and should therefore not be set

Some servers require auth. You're right userName is not used in the code.

OK, I found the problem https://searchfox.org/comm-central/rev/bebb4108cb6fd752fafabf30ef63122b27d448d8/mailnews/news/src/nsNewsFolder.cpp#745. When userName exists, serverURI contains the userName, so it doesn't match the url in LoginManager. I don't know if it's worth to fix. Do you remember why you had realuserName in the first place?

(In reply to Ping Chen (:rnons) from comment #3)

I don't know if it's worth to fix. Do you remember why you had realuserName in the first place?

I don't know. I think in older TBs there was a user name field in the server settings. And my profile is certainly that old.

See Also: → 1777439

This will be fixed by bug 1777439, thanks.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE
Assignee: nobody → remotenonsense
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---

No need, the url used in LoginManager depends on localStoreType, not protocol scheme, https://searchfox.org/comm-central/rev/cc353b72225b635c359aa88dbb5d20242de7ac40/mailnews/base/src/nsMsgIncomingServer.cpp#658

Target Milestone: --- → 107 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/ded56de4d5b7
Do not include username in server uri when getting nntp password. r=mkmelin

Status: REOPENED → RESOLVED
Closed: 2 years ago2 years ago
Resolution: --- → FIXED

Comment on attachment 9297196 [details]
Bug 1770594 - Do not include username in server uri when getting nntp password. r=mkmelin

[Approval Request Comment]
Regression caused by (bug #): nntp-js
User impact if declined: Saved password for NNTP server can't be used if mail.server.<serverID>.userName exists.
Testing completed (on c-c, etc.): beta
Risk to taking this patch (and alternatives if risky): low

Attachment #9297196 - Flags: approval-comm-esr102?

Comment on attachment 9297196 [details]
Bug 1770594 - Do not include username in server uri when getting nntp password. r=mkmelin

[Triage Comment]
Approved for esr102

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

Attachment

General

Created:
Updated:
Size: