Closed Bug 1679769 Opened 3 years ago Closed 3 years ago

An inline signed OpenPGP message having lines with leading whitespace fails to verify

Categories

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

Tracking

(thunderbird_esr78+ fixed, thunderbird85 fixed)

RESOLVED FIXED
86 Branch
Tracking Status
thunderbird_esr78 + fixed
thunderbird85 --- fixed

People

(Reporter: KaiE, Assigned: KaiE)

References

Details

Attachments

(2 files)

Receive an inline signed message, starting with BEGIN PGP SIGNED MESSAGE and (not PGP/MIME).

If the plain text message contains lines that begin with leading whitespace, the signature verification fails.

The failure is caused by the following line

msgText = EnigmailMsgRead.trimAllLines(msgText);

found in messageParse(), in file enigmailMessengerOverlay.js

Patrick, do you remember the intention of this trim?

It seems incorrect when processing an inline message.

Should this line be removed - or should trim be limited to certain scenarios?

Flags: needinfo?(patrick)

I believe that this is only relevant for the conversion of certain HTML mails to plain text.

Flags: needinfo?(patrick)
See Also: → 1660041
Severity: -- → S2
Priority: -- → P1

Pushed by kaie@kuix.de:
https://hg.mozilla.org/comm-central/rev/cd8a00e0e3b1
Limit trimming of OpenPGP messages to the separator line. r=PatrickBrunschwig DONTBUILD

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

I realize that the commit message no longer reflected reality.

We left-trim all lines for encrypted messages, and don't trim anything for signed messages.

Comment on attachment 9192000 [details]
Bug 1679769 - Limit trimming of OpenPGP messages to the separator line. r=PatrickBrunschwig

[Approval Request Comment]
Regression caused by (bug #): no
User impact if declined: we show false security status
Testing completed (on c-c, etc.):
Risk to taking this patch (and alternatives if risky): medium, potentially some other messages will get incorrect security status, but no scenario is known yet

Attachment #9192000 - Flags: approval-comm-beta?
Target Milestone: --- → 85 Branch

Hmm, there was no merge yet. So apparently this will automatically be part of the next beta, without beta uplift?

Target Milestone: 85 Branch → 86 Branch

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

Hmm, there was no merge yet. So apparently this will automatically be part of the next beta, without beta uplift?

I was wrong, the merge happened already, thanks to justdave for clarifying. I'll request beta uplift.

Would be preferable to land test and fix at the same time. I'll land the test for today's nightly.

Pushed by kaie@kuix.de:
https://hg.mozilla.org/comm-central/rev/73831e108c0a
Add test for signed inline message with leading whitespace. r=mkmelin

Attachment #9193206 - Flags: approval-comm-beta?

Comment on attachment 9193206 [details]
Bug 1679769 - Add test for signed inline message with leading whitespace. r=mkmelin

[Triage Comment]
Approved for beta

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

Comment on attachment 9192000 [details]
Bug 1679769 - Limit trimming of OpenPGP messages to the separator line. r=PatrickBrunschwig

[Triage Comment]
Approved for beta

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

Comment on attachment 9192000 [details]
Bug 1679769 - Limit trimming of OpenPGP messages to the separator line. r=PatrickBrunschwig

[Approval Request Comment]
Regression caused by (bug #): no
User impact if declined: we show false security status
Testing completed (on c-c, etc.):
Risk to taking this patch (and alternatives if risky): medium, potentially some other messages will get incorrect security status, but no scenario is known yet

Attachment #9192000 - Flags: approval-comm-esr78?

Comment on attachment 9192000 [details]
Bug 1679769 - Limit trimming of OpenPGP messages to the separator line. r=PatrickBrunschwig

[Triage Comment]
Approved for esr78

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

Attachment

General

Created:
Updated:
Size: