Closed Bug 1768424 Opened 4 years ago Closed 4 years ago

Thunderbird cannot import OpenPGP public key if there is no blank link between header and data

Categories

(MailNews Core :: Security: OpenPGP, defect)

defect

Tracking

(thunderbird_esr91 affected, thunderbird101 fixed)

VERIFIED FIXED
102 Branch
Tracking Status
thunderbird_esr91 --- affected
thunderbird101 --- fixed

People

(Reporter: KaiE, Assigned: rjl)

References

Details

Attachments

(2 external files)

An OpenPGP public key file in the ASCII format usually starts with the header line, is then followed by a blank line, following by the key data, e.g.:

----BEGIN PGP PUBLIC KEY BLOCK-----

mQ...

A user has reported being unable to import a file that is missing the blank line and looks like this:

----BEGIN PGP PUBLIC KEY BLOCK-----
mQ...

I see that gnupg is willing to import the file despite the missing blank line.

Nickolay, is this a bug in RNP? Are you unnecessarily strict? Or is there a good reason to enforce the presence of the blank line?

Yeah, we required this empty line as this is how per-standard it is defined. But then decided to change this behaviour as this doesn't give any additional security but could cause problems for the user.
Was fixed via this PR : https://github.com/rnpgp/rnp/pull/1745 and will be included into the next RNP release.

Thanks Nickolay,

Do you think it would be safe to apply the above patch on top of the v0.16.0 release?
I see it applies without conflicts.

If yes, we could apply that patch to Thunderbird's copy of RNP.

Yeah, that should be safe as changes are quite minor. Just do not forget to remove patch on the next RNP release.

Assignee: nobody → rob
Status: NEW → ASSIGNED
Depends on: 1767272
Target Milestone: --- → 102 Branch

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/1859fc15bcf4
Add upstream patch for bug 1768424. r=kaie
https://hg.mozilla.org/comm-central/rev/106b368782c8
Patch RNP to permit importing public keys without a blank line after the header. r=kaie

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

Comment on attachment 9275960 [details]
Bug 1768424 - Patch RNP to permit importing public keys without a blank line after the header. r=kaie

[Triage Comment]
For both patches on this bug. Patch is from upstream and was reviewed by RNP team. Approved by wsmwk via Matrix.

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

Verified fixed in 101.0b3 and 102.0a1.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: