Closed Bug 1739498 Opened 3 years ago Closed 3 years ago

Old profiles break in TB91, if the default PAB entry is not an sqlite address book (no AB, unable to send mails)

Categories

(Thunderbird :: Address Book, defect)

Thunderbird 91
defect

Tracking

(thunderbird_esr91+ fixed, thunderbird98 fixed)

RESOLVED FIXED
99 Branch
Tracking Status
thunderbird_esr91 + fixed
thunderbird98 --- fixed

People

(Reporter: TbSync, Assigned: TbSync)

References

Details

Attachments

(1 file)

This is from the prefs.js of such an older profile:

user_pref("ldap_2.servers.pab.csid", "iso-8859-1");
user_pref("ldap_2.servers.pab.filename", "pab.na2");
user_pref("ldap_2.servers.pab.locale", "German_Germany");
user_pref("ldap_2.servers.pab.position", 2);
user_pref("ldap_2.servers.pab.replication.lastChangeNumber", 0);
user_pref("ldap_2.servers.pab_1.csid", "iso-8859-1");
user_pref("ldap_2.servers.pab_1.description", "pab");
user_pref("ldap_2.servers.pab_1.dirType", 101);
user_pref("ldap_2.servers.pab_1.filename", "abook.sqlite");
user_pref("ldap_2.servers.pab_1.isOffline", false);
user_pref("ldap_2.servers.pab_1.locale", "German_Germany");
user_pref("ldap_2.servers.pab_1.replication.lastChangeNumber", 0);
user_pref("ldap_2.servers.pab_1.uid", "11e8db95-8793-4032-8cbe-34024822681f");

This profile worked in TB78 and failed after upgrading to TB91. As you can see, the default pap entry is an older pab.na2 file. The actual used PAB is the pab_1 entry.

The user can rescue his profile by swapping pab and pab_1 entries.

Thunderbird should not assume the standard pab entry to be an sqlite file.

I can provide the 100MB profile to reproduce but since it is not mine, I cannot attach it to the bug.

Severity: -- → S2
Blocks: tb91found

The *.na2 addressbook files are seen as jsaddrbook URL:

jsaddrbook://pab.na2

and are treated as sqlite databases and will die here:
https://searchfox.org/comm-central/rev/6e63f411c4df40dfef72dbfa9fb8a091eccfe386/mailnews/addrbook/modules/SQLiteDirectory.jsm#43

What is the strategy? Harden the different functions to not die and skip those files, or removing those old entries from the prefs / directory?

Flags: needinfo?(geoff)

I think the best thing to do is just fix the affected profile(s). .na2 address books are ancient technology (well before my time) and there's unlikely to be many of them around so I don't think it's worth trying to change the code for.

Flags: needinfo?(geoff)

Maybe we should still check if file.path.endsWith(".sqlite") and ignore if not. It was always named .sqlite, right?

I suppose so.

I misread comment 2. I assumed that meant to be a wontfix and users should fix their profiles. I will have a go at it.

Assignee: nobody → john
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

I keep forgetting about this one. Will try to fix it now.

Flags: needinfo?(john)
Flags: needinfo?(john)
Target Milestone: --- → 98 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/59927c5a3a79
Prevent usage of incompatible address book files. r=darktrojan

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: 98 Branch → 99 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/395b57d41a6d
Prevent usage of incompatible address book files. r=darktrojan

Status: REOPENED → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → FIXED

Might as well uplift this asap.

Comment on attachment 9259591 [details]
Bug 1739498 - Prevent usage of incompatible address book files. r=darktrojan

[Approval Request Comment]
Regression caused by (bug #):
User impact if declined:
Old profiles which still use some older file types and somehow have missed migration, crash.

Testing completed (on c-c, etc.):
Risk to taking this patch (and alternatives if risky):
Hard to say. We need to check closely for test fails.

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

Comment on attachment 9259591 [details]
Bug 1739498 - Prevent usage of incompatible address book files. r=darktrojan

[Triage Comment]
Approved for beta

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

Comment on attachment 9259591 [details]
Bug 1739498 - Prevent usage of incompatible address book files. r=darktrojan

[Approval Request Comment]
Regression caused by (bug #):
User impact if declined:
Old profiles which still use some older file types and somehow have missed migration, crash.

Testing completed (on c-c, etc.):
On beta since 8 days

Risk to taking this patch (and alternatives if risky):
If we did not see an increase in beta crashes, it should be fine.

Attachment #9259591 - Flags: approval-comm-esr91?

Comment on attachment 9259591 [details]
Bug 1739498 - Prevent usage of incompatible address book files. r=darktrojan

[Triage Comment]
Approved for esr91

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

Attachment

General

Created:
Updated:
Size: