Closed Bug 1739903 Opened 2 years ago Closed 2 years ago

After updating to Thunderbird 91, message filters that refer to folders with non-ASCII names in Gmail will need to be manually modified

Categories

(Thunderbird :: Filters, defect)

Thunderbird 91
defect

Tracking

(thunderbird_esr91+ fixed, thunderbird95 fixed)

RESOLVED FIXED
96 Branch
Tracking Status
thunderbird_esr91 + fixed
thunderbird95 --- fixed

People

(Reporter: earlgreypicard, Assigned: rachel)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Steps to Reproduce:

  1. Set up an IMAP account for a non-ASCII (Japanese, etc.) version of Gmail in Thunderbird 78.
  2. Create some message filter rule that moves messages to an IMAP folder with a non-ASCII name.
  3. Start Thunderbird 91 with the same profile.
  4. Test message filter.

Actual Results:

Filter rules for folders with non-ASCII names will not work.
This is because folder's URI is renamed from modified UTF-7 to UTF-8 without user confirmation, but msgFilterRules.dat is not changed accordingly.
Filter rules need to be modified manually.

Expected Results:

Unless the folder display name has changed, the message filter should work without manual modification.
In addition, I think it is desirable to set mail.server.default.allow_utf8_accept to false by default and enable it with user confirmation.

Thanks for the detailed report. Another example of Bug 1739789 - Smart/unified/virtual folders do not keep folder selection properly when a folder contains a non-ascii character

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE

(In reply to Wayne Mery (:wsmwk) from comment #1)

Thanks for the detailed report. Another example of Bug 1739789 - Smart/unified/virtual folders do not keep folder selection properly when a folder contains a non-ascii character

*** This bug has been marked as a duplicate of bug 1739789 ***

I think bug 1739789 is a problem that occurs because the API interprets the UTF-8 URI as an ACString and tries to read it in smart / unified / virtual folders.
I am concerned that the actual name of the folder is changed and the message filter does not work without notifying the user.
I hope bug 1739789 incorporates the above perspective.

This would be a different set of internal APIs to bug 1739789, probably these ones, hence re-opening so it can be handled separately.

(These interfaces were originally listed on bug 1739814, but as we now have a specific bug moving them across here).

Blocks: 1739814
Status: RESOLVED → REOPENED
Ever confirmed: true
Regressed by: 1571672
Resolution: DUPLICATE → ---

Includes all APIs (and more) mentioned in comment #3. clang-format was run.

It won't fix the reported bug though since likely the new representation in msgFilterRules.dat will be UTF-8 whereas before it was MUTF-7 (or percent-encoded?). One might need to write a converter for that.

Attachment #9252398 - Flags: review?(mkmelin+mozilla)
Comment on attachment 9252398 [details] [diff] [review]
1739903-string-APIs-AUTF8String.patch

Review of attachment 9252398 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good, I've set off a try run: https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=f2e38828e558bda4ae960bcd073f8d59335dab02
Attachment #9252398 - Flags: review?(mkmelin+mozilla) → review+
Assignee: nobody → rachel
Status: REOPENED → ASSIGNED

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/7296008c832d
Change filter-related URI APIs to AUTF8String. r=mkmelin

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

Comment on attachment 9252398 [details] [diff] [review]
1739903-string-APIs-AUTF8String.patch

[Approval Request Comment]
Regression caused by (bug #): bug 1571672
User impact if declined: Various things don't work on folders with non-ASCII names: Saves multiple drafts, virtual folders don't work, etc.
Testing completed (on c-c, etc.): Yes.
Risk to taking this patch (and alternatives if risky):
Not risky, mostly mechanical change of raw string API to "smart" string API allowing for non-ASCII strings to be correctly passed around.
Part of a pack of four bugs which need to be uplifted in this order:
Bug 1741559, bug 1741619, bug 1739814, bug 1739903. Bug 1739784 was the first one in the series and that's already on ESR.

Attachment #9252398 - Flags: approval-comm-esr91?
Attachment #9252398 - Flags: approval-comm-beta?

Comment on attachment 9252398 [details] [diff] [review]
1739903-string-APIs-AUTF8String.patch

[Triage Comment]
Approved for beta

Attachment #9252398 - Flags: approval-comm-beta? → approval-comm-beta+
Target Milestone: --- → 96 Branch

Comment on attachment 9252398 [details] [diff] [review]
1739903-string-APIs-AUTF8String.patch

[Triage Comment]
Approved for esr91

Attachment #9252398 - 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

Creator:
Created:
Updated:
Size: