Closed Bug 1680425 Opened 5 years ago Closed 2 years ago

If OpenPGP code is enabled, "(was: xyz)" not removed from subject line on reply

Categories

(MailNews Core :: Security: OpenPGP, defect)

defect

Tracking

(thunderbird_esr102 wontfix, thunderbird114 fixed)

RESOLVED FIXED
115 Branch
Tracking Status
thunderbird_esr102 --- wontfix
thunderbird114 --- fixed

People

(Reporter: jake, Assigned: mkmelin)

References

Details

(Keywords: regression)

Attachments

(2 files)

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

Steps to reproduce:

Reply to email with subject "New subject (was: Old subject)"

Actual results:

New email subject line is "Re: New subject (was: Old subject)"

Expected results:

New email subject line is "Re: New subject"

Previous versions of Thunderbird sorted this out.

I can confirm this bug with TB78.5.1 but not TB78.1.1.

The regression range with my private builds is:

Last good:
Thunderbird (76.0a1) Rev: Comm-Central:ff8590f85d5e / Mozilla-Central:2aa33873a0c7
First bad:
Thunderbird (76.0a1) Rev: Comm-Central:1da13833761b / Mozilla-Central:4f16fe418e32
-> https://hg.mozilla.org/comm-central/log/1da13833761b5a26cbecf07006c4eea846826bb4?revcount=11

But strangely the official daily:
http://ftp.mozilla.org/pub/thunderbird/nightly/2020/03/2020-03-29-10-46-29-comm-central/
Thunderbird (76.0a1) - Thunderbird Daily BuildID=20200329104629
Rev: Comm-Central:1da13833761b / Mozilla-Central:4f16fe418e32
doesn't show this behavior.

My builds were build with ac_add_options --enable-openpgp

@Kai Engert:
Was openPGP still disabled in TB Daily BuildID=20200329104629?
And could it then be that one of your PGP/Enigmail pathches is responsible for this?

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(kaie)
Component: Untriaged → Security: OpenPGP
Product: Thunderbird → MailNews Core

You could try to temporarily switch the runtime pref mail.openpgp.enable to false then restart Thunderbird.

This should disable the code that runs messages through OpenPGP MIME processing.

Does this setting have any influence on your reported issue?

Flags: needinfo?(kaie)

(In reply to Kai Engert (:KaiE:) from comment #2)

You could try to temporarily switch the runtime pref mail.openpgp.enable to false then restart Thunderbird.

This should disable the code that runs messages through OpenPGP MIME processing.

Does this setting have any influence on your reported issue?

Yes - with mail.openpgp.enable = false it works fine.

Yes - with mail.openpgp.enable = false it works fine.

I concur.

Summary: "(was: xyz)" not removed from subject line on reply/forward → If OpenPGP code is enabled, "(was: xyz)" not removed from subject line on reply/forward
Keywords: regression

https://github.com/Betterbird/thunderbird-patches/blob/main/91/bugs/1680425-dont-overwrite-subject.patch
The code being removed doesn't seem to serve any purpose. It restores the "(was: ...)" part from the message database which was previously removed here:
https://searchfox.org/comm-central/rev/0229f03365a25260a8b09528024ec7d08160ca4a/mailnews/compose/src/nsMsgCompose.cpp#1688-1731

(In reply to Rachel Martin from comment #6)

The code being removed doesn't seem to serve any purpose.

Glad to hear someone is on the case.

Is something like git blame available to find out why it was added, or has it come from a new [PGP] component in which it was always there?

What does Enigmail.msg.fixMessageSubject() do? Might it still be needed or should it originally have been within the if conditional anyway?

https://searchfox.org/comm-central/rev/421eadd46d2992f01ce682981302b6b215328b89/mail/extensions/openpgp/content/ui/enigmailMsgComposeOverlay.js#496
https://searchfox.org/comm-central/rev/421eadd46d2992f01ce682981302b6b215328b89/mail/extensions/openpgp/content/ui/enigmailMsgComposeOverlay.js#2962
fixMessageSubject() replaces multiple "Re: " prefixes with just one. At least these days, the "Re: " prefix isn't stored in the subject header in the database at all, instead the Ci.nsMsgMessageFlags.HasRe is stored. So perhaps the code is relevant historically. The damage is done by the setOriginalSubject() call, so fixMessageSubject() could be left in place if still required.

The new version, 102.3.2 (64-bit) seems to have now broken this feature completely, or it decided to re-enable the OpenGPG option.

Either way, that's a bug. Haven't got time to check now - it will take me forever to hunt around for the setting, if it even still exists.

Also a regression, in either case.

Also, I'm getting repeated "Fwd: Fwd:" with the new version.

I only installed it to try and test a fix on another bug 1746761 - it was not pushed upon me through an automatic/encouraged update. (I generally like the way Thunderbird strongly suggests updating, but does not force it on you - unlike, um, almost evey other software.)

(In reply to jake from comment #10)

(I generally like the way Thunderbird strongly suggests updating, but does not force it on you - unlike, um, almost evey other software.)

This is off-topic, but I need to clarify. Even the suggested updates are to a version several behind the latest. So it will have had plenty of time in the field for bugs to be ironed out, through use by users who always like to have the latest and greatest, or manually updated because they really wanted a specific new feature. I really like this release/update process, and would actually love to know how it actually works. Kudos.

(In reply to jake from comment #11)

would actually love to know how it actually works.

I mean, in terms of the process and produre behind it, behind the scenes.

(In reply to Kai Engert (:KaiE:) from comment #2)

You could try to temporarily switch the runtime pref mail.openpgp.enable to false then restart Thunderbird.

I cannot find how to access these preferences in the new version of Thunderbird.

Please someone help.

(In reply to jake from comment #13)

(In reply to Kai Engert (:KaiE:) from comment #2)

You could try to temporarily switch the runtime pref mail.openpgp.enable to false then restart Thunderbird.

I cannot find how to access these preferences in the new version of Thunderbird.

Please someone help.

I've added #1796024. It seems totally ridiculous that I cannot get to the config page. Am I missing something, or has something been broken?

(In reply to Alfred Peters from comment #3)

(In reply to Kai Engert (:KaiE:) from comment #2)

You could try to temporarily switch the runtime pref mail.openpgp.enable to false then restart Thunderbird.

This should disable the code that runs messages through OpenPGP MIME processing.

Does this setting have any influence on your reported issue?

Yes - with mail.openpgp.enable = false it works fine.

Not any more. It is broken in TB 102 even with this setting at false.

In 102 you can't disable OpenPGP anymore.

Attachment #9331109 - Flags: review?(mkmelin+mozilla)
Comment on attachment 9331109 [details] [diff] [review] 1680425-dont-overwrite-subject.patch Review of attachment 9331109 [details] [diff] [review]: ----------------------------------------------------------------- Looks good. r=mkmelin I'll add a test for this
Attachment #9331109 - Flags: review?(mkmelin+mozilla) → review+

(We don't do this for forward.)

Summary: If OpenPGP code is enabled, "(was: xyz)" not removed from subject line on reply/forward → If OpenPGP code is enabled, "(was: xyz)" not removed from subject line on reply
Assignee: nobody → mkmelin+mozilla
Status: NEW → ASSIGNED

Checkin-needed - both patches.

Target Milestone: --- → 115 Branch

Pushed by alessandro@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/f8511439ab48
Add test for thread subject change handling - New (was: Old) style. r=john.bieling

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

Backout because I didn't include the inline patch (borderline impossible to keep track of those if they're not in phab), as well as test failures and missing try run to confirm the newly created test works on every platform.
https://hg.mozilla.org/comm-central/rev/58d9bbb7a9f218a13ed3968f2a6f02cd9bf04e73

Pushed by alessandro@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/e3add5ef634f
Add test for thread subject change handling - New (was: Old) style. r=#thunderbird-reviewers
https://hg.mozilla.org/comm-central/rev/cea3be5f85a3
Don't overwrite subject in NotifyComposeBodyReady() listener in OpenPGP. r=mkmelin

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

Comment on attachment 9332611 [details]
Bug 1680425 - Add test for thread subject change handling - New (was: Old) style. r=#thunderbird-reviewers

[Triage Comment]
Approved for beta

Attachment #9332611 - Flags: approval-comm-beta+

Comment on attachment 9331109 [details] [diff] [review]
1680425-dont-overwrite-subject.patch

[Triage Comment]
Approved for beta

Attachment #9331109 - 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: