Closed Bug 1661928 Opened 6 years ago Closed 5 years ago

calender don't save password - httprealm is "" (can't store passwords for ftp hosted calendars)

Categories

(Calendar :: General, defect)

defect

Tracking

(thunderbird_esr78 affected, thunderbird85 affected)

RESOLVED WONTFIX
Tracking Status
thunderbird_esr78 --- affected
thunderbird85 --- affected

People

(Reporter: andreas.hanisch, Assigned: andreas.hanisch)

References

Details

Attachments

(1 file)

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

Steps to reproduce:

Create a new calendar on ftp share.
Credentials for server is typed in and save password is checked

This bug is in Version 68 too

Actual results:

Password is not stored
exception "Can't add a login without a httpRealm or formActionOrigin." from _CheckLogin() in LoginManager.jsm Line 283

Next synchronisation ask for server credentials again

Expected results:

httpRealm should be a copy of origin, so the password can be stored and found for next synchronisations.

In PromtAuth() CalAuthUtils.jsm Line240 the call of PasswordManagerSave is done with aAuthInfo.realm which is ""
So this Parameter in call PromtAuth() has to be different to save the password of ftp servers.

Component: Untriaged → General
Product: Thunderbird → Calendar
Summary: calender don't save password - httprealm is "" → calender don't save password - httprealm is "" (can't store passwords for ftp hosted calendars)
Version: 78 → unspecified
Status: UNCONFIRMED → NEW
Ever confirmed: true

After some debugging:
promptAuth() calculates hostRealm.passwordRealm in line 215 or 216
hostRealm.passwordRealm = aChannel.URI.host + ":" + port + " (" + aAuthInfo.realm + ")";

In line 220 or 221 there is a search for the saved password
let pwInfo = this.getPasswordInfo(hostRealm, requestedUser);

If no password was found and the user filled in the messagebox and checked save password
than
calauth.passwordManagerSave() in line 240 or 241 is called but with parameter aAuthInfo.realm and not hostRealm.passwordRealm

As aAuthInfo.realm is a part of hostRealm.passwordRealm this call should be corrected in this way:
calauth.passwordManagerSave(
aAuthInfo.username,
aAuthInfo.password,
hostRealm.prePath,
hostRealm.passwordRealm
);

Can you submit a patch?

May be.
What is the procedure to do it?

Assignee: nobody → andreas.hanisch
Status: NEW → ASSIGNED
Attachment #9193467 - Flags: review?(geoff)

Thanks for the patch! To get the patch reviewed you set the "review" flag of the patch to a reviewer. I've done that for you now.

Hello Magnus,

please set status-thunderbird_esr78 to affected.

Comment on attachment 9193467 [details] [diff] [review]
Bug 1661928 - fix calender don't save password

This would break everything else that comes through here. Yes, a non-empty string needs to be passed here, but aAuthInfo.realm is the right string in most cases. hostRealm.passwordRealm is bogus and can actually be removed. Unfortunately, I should also tell you that FTP capability is being discontinued, so you're probably wasting your time fixing it.

Attachment #9193467 - Flags: review?(geoff) → review-

I guess we should wontfix this then.

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: