Closed Bug 1739814 Opened 3 years ago Closed 3 years ago

More potential non-ascii URI breakage from bug 1571672

Categories

(Thunderbird :: General, defect)

defect

Tracking

(thunderbird_esr91+ fixed, thunderbird95 fixed)

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

People

(Reporter: standard8, Assigned: rachel)

References

(Regression)

Details

(Keywords: intl, regression)

Attachments

(2 files)

Other APIs that are potentially broken from bug 1571672 are listed below. These could cause various breakages with folders that have non-ascii names.

Not all of these are currently used from JavaScript, though some could be used by add-on experiments.

I generated the list by looking through the results of a search for uri on mail**idl. There may be more under url, though mailnews does seem fairly consistent.

Depends on: 1739903

Note, I just moved the message filtering broken APIs out to bug 1739903, as that's a more specific bug.

Assignee: nobody → nicolai
Depends on: 1741619

Thanks Mark, some of this is certainly covered in bug 1741619. That bug started by checking whether changes from https://hg.mozilla.org/comm-central/rev/de1e80c4a20f could be pushed further down and it rippled on from there.

The German newsgroup de.comm.software.mozilla.mailnews reports that multiple drafts are stored on IMAP, likely related to the fact that the drafts folder is called "Entwürfe" in German.

Together with the patch from bug 1741619 this fixes most (not all) call sites from comment #0. Also needing treatment are the call sites from bug 1739903. clang-format has not been run.
We're using this on ESR 91:
https://github.com/Betterbird/thunderbird-patches/blob/main/91/bugs/1739814-saved-draft.patch
The ESR patch also patches nsMsgSend.cpp which doesn't exist on C-C any more.

This fixes the issue that multiple drafts are stored in draft folders with non-ASCII names, easily seen on Gmail with German UI or a draft folder "Drafté" on a UTF-8 supporting server like Gmail.

Blocks: tb91found
Severity: -- → S2
Keywords: intl

Comment on attachment 9251446 [details] [diff] [review]
1739814-saved-draft.patch

Patch also appears to be fixing bug 1739789.

Comment on attachment 9251446 [details] [diff] [review]
1739814-saved-draft.patch

Please apply clang-format and update the commit message to:
Change more URI APIs to from raw string to smart string. Fixes saving drafts and smart/unified/virtual folders.

Attachment #9251446 - Flags: review?(mkmelin+mozilla)
Comment on attachment 9251446 [details] [diff] [review] 1739814-saved-draft.patch Review of attachment 9251446 [details] [diff] [review]: ----------------------------------------------------------------- Seems to work, r=mkmelin
Attachment #9251446 - Flags: review?(mkmelin+mozilla) → review+
Keywords: leave-open
Target Milestone: --- → 96 Branch
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/829aaf569187 Change more URI APIs to from raw string to smart string. Fixes saving drafts and smart/unified/virtual folders. r=mkmelin

For bonus points we fixed nsMsgCompose::CreateMessage() as well and ran clang-format.

Attachment #9251959 - Flags: review?(mkmelin+mozilla)
Comment on attachment 9251959 [details] [diff] [review] 1739814-remaining-APIs.patch Review of attachment 9251959 [details] [diff] [review]: ----------------------------------------------------------------- Looks alright, r=mkmelin
Attachment #9251959 - Flags: review?(mkmelin+mozilla) → review+

Please remove "leave-open", this is the second and last patch.

And please close bug 1739789.

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/ced97457c09f
Change remaining URI APIs to from raw string to smart string. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED

Comment on attachment 9251446 [details] [diff] [review]
1739814-saved-draft.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.

Request covers both patches here.

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

Comment on attachment 9251446 [details] [diff] [review]
1739814-saved-draft.patch

[Triage Comment]
Approved for beta

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

Comment on attachment 9251959 [details] [diff] [review]
1739814-remaining-APIs.patch

[Triage Comment]
Approved for beta

Attachment #9251959 - Flags: approval-comm-esr91?
Attachment #9251959 - Flags: approval-comm-beta+

Comment on attachment 9251446 [details] [diff] [review]
1739814-saved-draft.patch

[Triage Comment]
Approved for esr91

Attachment #9251446 - Flags: approval-comm-esr91? → approval-comm-esr91+

Comment on attachment 9251959 [details] [diff] [review]
1739814-remaining-APIs.patch

[Triage Comment]
Approved for esr91

Attachment #9251959 - Flags: approval-comm-esr91? → approval-comm-esr91+

To the person doing the uplifts:
The patches for bug 1741619, bug 1739814 and bug 1739789 don't apply cleanly to esr-91. Some have additional hunks for nsMsgAttachmentHandler.cpp, nsMsgSend.cpp and around DisplayMessageForPrinting(). We have esr-91 versions of those patches here:
https://github.com/Betterbird/thunderbird-patches/tree/main/91/bugs, see:
https://github.com/Betterbird/thunderbird-patches/blob/3c43707766fc87fc5fd20759c7111edfa9ab9034/91/series#L32-L36

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: