Closed Bug 1706918 Opened 4 years ago Closed 3 years ago

mail.forward_subject_prefix gives broken enoding when openpgp is enabled

Categories

(Thunderbird :: Message Compose Window, defect)

Thunderbird 89
defect

Tracking

(thunderbird91 fixed, thunderbird92 fixed)

RESOLVED FIXED
92 Branch
Tracking Status
thunderbird91 --- fixed
thunderbird92 --- fixed

People

(Reporter: 31, Assigned: lasana)

References

(Regression)

Details

(Keywords: regression)

Attachments

(6 files)

Attached image DontShowAsNeeded.jpg (deleted) —

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

Steps to reproduce:

I change variable-parameter mail.forward_subject_prefix to UTF8 string
and early versions encoded this OK...
Last 2-3 versions show this value wrong...

Actual results:

When message is forwarded, string was wrong showed...
i.e.
word: "Проследи" -> "ÐÑоÑледи"

Expected results:

word: "Проследи" -> "Проследи" before ":" in subject line of forwarded message...

From https://thunderbird.topicbox.com/groups/developers/T0e8f17a4e0d049c0-Mfdbb318429360c38849cb05f

The code around mail.forward_subject_prefix looks strange:
https://searchfox.org/comm-central/rev/7ed718c90a58141a74da3acbf3f97ad8854e5561/mailnews/compose/src/nsMsgCompose.cpp#1944
Since that's retrieved from a pref, it should be treated as Unicode (UTF-16) and not converted from UTF-8 to UTF-16.

Comment #1 is wrong. I did a bit of debugging. This went broken in TB 78 where Enigmail was integrated into Thunderbird.

Set the preference mail.openpgp.enable to false, and you will see that your prefix will work, I tried with Проследи. Works for both inline forward and forward as attachment. Looks like the processing here is wrong:
https://searchfox.org/comm-central/rev/7ed718c90a58141a74da3acbf3f97ad8854e5561/mail/extensions/openpgp/content/ui/enigmailMsgComposeOverlay.js#501-567

Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression

I test this with Thunderbird 89.0b1 (64-bit)...

And here dont work...

Attached image forward works.png (deleted) —

Forward works for me in an en-US version of TB 89b1 (x64), but only if I switch preference mail.openpgp.enable to false. Have you done that?

This version dont work with changes of this parameter/value... (mail.openpgp.enable set to false)

Maybe, there is one more side effect of some other variable...

Attached image DontWorkForwardUTF8.jpg (deleted) —

Maybe I dont restarted client...
Now WORK!!!
Thanks!

Attached image Screenshot_1953.jpg (deleted) —

Today test... OK.

Thanks!

Turning off OpenPGP may be a workaround, but unfortunately not a solution.

Flags: needinfo?(kaie)
Summary: mail.forward_subject_prefix → mail.forward_subject_prefix gives broken enoding when openpgp is enabled
Assignee: nobody → lasana
Status: NEW → ASSIGNED
Regressed by: 1677088

getCharPref was used on a value that may be utf8.

Flags: needinfo?(kaie)

Pushed by thunderbird@calypsoblue.org:
https://hg.mozilla.org/comm-central/rev/e8b3ecd00ddf
Use getStringPref() to retrieve mail.forward_subject_prefix when openpgp enabled. r=kaie

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

Please get into the habit to set the Milestone and the status flags (or else, you will not realise that the bug needs uplift).

Target Milestone: --- → 92 Branch

Comment on attachment 9231972 [details]
Bug 1706918 - Use getStringPref() to retrieve mail.forward_subject_prefix when openpgp enabled. r=kaie

[Triage Comment]
Small fix for reading a preference correctly, taking for 91b4.

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

Attachment

General

Creator:
Created:
Updated:
Size: