Closed Bug 2085365 Opened 1 month ago Closed 17 days ago

GMX (non-ASCII trash name, no UTF8=ACCEPT): trash flag lost after restart, deleted messages are expunged

Categories

(MailNews Core :: Networking: IMAP, defect)

Thunderbird 153
defect

Tracking

(thunderbird_esr153 affected)

RESOLVED FIXED
162 Branch
Tracking Status
thunderbird_esr153 --- affected

People

(Reporter: ingowertenbruch, Assigned: ndo84bw)

References

(Regression)

Details

(Keywords: dataloss, regression)

Attachments

(1 external file)

Steps to reproduce

  1. create a new mail account in Thunderbird for any "@gmx.de" account
  2. select any email, for example from your inbox
  3. press delete

Actual results

The server setting "When I delete a message" is set to "Move it to this folder", but no folder is selected ("Choose Folder")
Result: The mail is permanently deleted and therefore lost

Expected results

If, for any reason, no valid folder is selected in the server settings "When I delete a message", then any deletion attempt should throw an error or should be moved to "local folders/Trash" instead, but must not be deleted permanently

Keywords: dataloss

Reproduced on 153.6.0esr with a fresh profile and a GMX account. GMX does not offer UTF8=ACCEPT and its trash folder is "Gelöscht" (\Trash special-use).

  1. After account setup, "Gelöscht" has the trash flag, but trash_folder_name is stored as MUTF-7: Gel&APY-scht.
  2. After a restart, folder discovery compares that value with the UTF-8 name Gelöscht, finds no match and clears the trash flag.
  3. With no trash folder, deleting a message expunges it. A test message was gone, not in "Gelöscht".

In nsImapIncomingServer::DiscoveryDone, bug 1958781 converted the compared path to UTF-8, but both places that write the pref still store the raw server path.

On 154 and later, bug 2047462 keeps the server's special-use flags, so deleting works, but the pref is still wrong and Server Settings show "Choose Folder".

Fix proposal: convert the path to UTF-8 before writing the pref. Without that fix, uplifting bug 2047462 to ESR 153 would stop the data loss.

Severity: -- → S2
Status: UNCONFIRMED → NEW
Component: Untriaged → Networking: IMAP
Ever confirmed: true
Keywords: regression
Product: Thunderbird → MailNews Core
Regressed by: 1958781
See Also: → 2047462, 2017706, 2048831
Summary: Trash folder not correctly set with @gmx.de-mail accounts - resulting in permanently deleted mails → GMX (non-ASCII trash name, no UTF8=ACCEPT): trash flag lost after restart, deleted messages are expunged

On servers without UTF8=ACCEPT, folder discovery stored the trash path as
MUTF-7, e.g. "Gel&APY-scht" for "Gelöscht", but compares it as UTF-8. On the
next start the trash folder lost its flag, Server Settings showed "Choose
Folder", and deleted messages were expunged instead of moved.

Discovery now stores UTF-8. Profiles that already have the MUTF-7 path get it
rewritten on the next discovery and keep their trash folder.

Assignee: nobody → ndo84bw
Status: NEW → ASSIGNED
Target Milestone: --- → 162 Branch

Pushed by jtracey@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/f4dbe96efbb1
Store the IMAP trash folder path as UTF-8 so a non-ASCII trash folder survives a restart. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 17 days ago
Resolution: --- → FIXED

Comment on attachment 9678546 [details]
Bug 2085365 - Store the IMAP trash folder path as UTF-8 so a non-ASCII trash folder survives a restart. r=#thunderbird-back-end-reviewers

Uplift Approval Request

  • Please state case for uplift consideration and ensure bug severity is set: Dataloss regression from bug 1958781. On IMAP servers without UTF8=ACCEPT and a non-ASCII trash folder (e.g. GMX "Gelöscht"), the trash folder loses its flag after a restart and deleted messages are expunged instead of moved. On 154+ this is partly hidden by bug 2047462, but ESR 153 is fully affected.
  • User impact if declined: Deleted messages are permanently lost for these users, without a warning.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Daily?: No
  • 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): Only the stored trash folder path changes from MUTF-7 to UTF-8, and existing MUTF-7 values are rewritten once. The central patch doesn't apply to esr153. An adapted esr153 patch with its own test is ready, try is green apart from known failures, and I tested it on 153.7 with a real GMX account. I'll attach it once this is approved.
  • Does the fix cause any migrations to be skipped?: No
  • String changes made/needed: None
Attachment #9678546 - Flags: approval-comm-esr153?
See Also: → 2094749
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: