Closed Bug 1819499 Opened 3 years ago Closed 3 years ago

Encrypted subjects do not show in the message header (shows only ellipsis ...)

Categories

(MailNews Core :: Security: OpenPGP, defect, P2)

Thunderbird 112
defect

Tracking

(thunderbird_esr102 unaffected, thunderbird113+ fixed)

RESOLVED FIXED
114 Branch
Tracking Status
thunderbird_esr102 --- unaffected
thunderbird113 + fixed

People

(Reporter: mkmelin, Assigned: mkmelin)

References

(Blocks 1 open bug)

Details

(Keywords: regression, Whiteboard: [Supernova3p])

Attachments

(1 file)

STR: send yourself an OpenPGP encrypted email. Check the sent folder.
Once you open the message subject will show properly elsewhere, but in the message header you will only see the ...
If you look closely, the unencrypted message subject briefly flashes before turning into "..."

Regressed by initial ash merge.

(For trunk do note bug 1819246.)

Blocks: sn-msgreader
Severity: -- → S3
Priority: -- → P2
Summary: encrypted subjects do not show in the message header (shows only ...) → Encrypted subjects do not show in the message header (shows only ellipsis ...)
Flags: needinfo?(kaie)
Assignee: nobody → mkmelin+mozilla
Status: NEW → ASSIGNED
Flags: needinfo?(kaie)
Target Milestone: --- → 113 Branch

Basically the fix is to set currentHeaderData.subject.headerValue to the value from the db, when we set the document title.
But there were problems with encodings; characters got garbled when passing XPCOM boundaries so needed to make hdr.subject a better type in the idl. Trying
to sync message header and thread pane with the same data created garbled content...
Setting subject for .eml files was unimplemented, so that needed fixing to make the added test work.

I think it's important that we get lots of testing for this change, and users are probably waiting for the fix, I suggest to uplift to beta shortly after landing into c-c.

For testers, a try build could be publicised to daily and e2ee topicbox groups

Hmm, something went wrong. I have a local beta 113 build plus this patch.
I was switching between two unencrypted messages.
And I toggled "view message body as" between simple and original html.

And suddenly my message had a completely wrong subject, which is now sticky on that message in Thunderbird. (Webmail still shows the correct subject.)

I cannot tell if this is related to this bug, or caused by some other bug in 113.

Flags: needinfo?(mkmelin+mozilla)

I've removed the .msf file in the ImapMail folder, and Thunderbird refreshed and is shown correct subject again.
I can no longer reproduce the bug.

I can't say if it's related or not. It wouldn't have been testable before though :/
If the wrong subject gets set in the db, that would be more visible - compared to 102 - with the patch since we will now always use the subject that is in the database for display. The patch isn't (essentially) changing how or when that subject gets set in the db - still enigmailMsgHdrViewOverlay.js setSubject(subject)

Flags: needinfo?(mkmelin+mozilla)
Target Milestone: 113 Branch → 114 Branch

Ok, let's land into c-c.

Pushed by kaie@kuix.de:
https://hg.mozilla.org/comm-central/rev/4b7f1e4113f1
Encrypted subjects were not show in the message header (showed only ellipsis ...). r=kaie

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

We'll need a follow-up fix for the bustage it caused in an #ifdef DEBUG block (another place that needs to be fixed because of the GetSubject type change). I'll push a fix as soon as my local debug build has completed.

Pushed by kaie@kuix.de: https://hg.mozilla.org/comm-central/rev/29afca2988bf Follow up to fix debug build. r=bustage
Pushed by kaie@kuix.de: https://hg.mozilla.org/comm-central/rev/890f4bd6d552 Follow up to fix Windows MAPI build. r=bustage

I've backed out all three landings, as this caused test failures in browser_messageMenu.js and browser_ext_message_external.js.

Backout: https://hg.mozilla.org/comm-central/rev/7118ff6d45931ddf9a90a150cb209e723c6444e8

Status: RESOLVED → REOPENED
Resolution: FIXED → ---

When you re-land, please consider simplifying https://hg.mozilla.org/comm-central/rev/4b7f1e4113f1#l14.37 to just:

 NS_IMETHODIMP nsMsgHdr::GetSubject(nsACString& resultSubject) {
+  return m_mdb->RowCellColumnToCharPtr(GetMDBRow(), m_mdb->m_subjectColumnToken,
+                                       getter_Copies(resultSubject));
 }

Successful try with bustage fixes, adjustment from above, and flag initialization (which was causing the the test failures)
https://treeherder.mozilla.org/jobs?repo=try-comm-central&selectedTaskRun=T4zDWepuQsqwOLPblBfK2g.0&revision=46f72925bf1c04318faca94841b46f030a403401

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/327f82032ed2
Encrypted subjects were not show in the message header (showed only ellipsis ...). r=kaie

Status: REOPENED → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → FIXED

Can this be uplifted to beta?

Flags: needinfo?(mkmelin+mozilla)

Comment on attachment 9327288 [details]
Bug 1819499 - Encrypted subjects were not show in the message header (showed only ellipsis ...). r=kaie

[Approval Request Comment]
Regression caused by (bug #): supernova
User impact if declined: encrypted subjects don't show in the message header
Testing completed (on c-c, etc.): c-c
Risk to taking this patch (and alternatives if risky): not a trivial patch, but fairly safe

Flags: needinfo?(mkmelin+mozilla)
Attachment #9327288 - Flags: approval-comm-beta?

Comment on attachment 9327288 [details]
Bug 1819499 - Encrypted subjects were not show in the message header (showed only ellipsis ...). r=kaie

[Triage Comment]
Approved for beta.

And thanks Magnus for the patch.

Attachment #9327288 - Flags: approval-comm-beta? → approval-comm-beta+
Regressions: 1829502

Comment on attachment 9327288 [details]
Bug 1819499 - Encrypted subjects were not show in the message header (showed only ellipsis ...). r=kaie

Holding off on beta until regression is fixed

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

Updating whiteboard to [supernova3p]. 20230424_2303

Whiteboard: [Supernova] → [Supernova3p]

Comment on attachment 9327288 [details]
Bug 1819499 - Encrypted subjects were not show in the message header (showed only ellipsis ...). r=kaie

(Good to go for beta, with bug 1829502)

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

Attachment

General

Created:
Updated:
Size: