thunderbird / thunderbird/thunderbird-android

Weird format on OpenPGP encrypt message subjects.

Open
#5,634 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Kotlin
Stars
14k
Forks
2.8k
Avg merge
3d 3h
Merged PRs (30d)
57

Description

Describe the bug
I have multiple email accounts in the K-9 and only one account has this problem. The problem is that after enable the "Encrypt message subjects", the mails sent with 'sign and encrypt' has a weird format that neither Thunderbird nor Interlink w/ Enigmail can decrypt the encrypted subject. Only pEp can recognize this weird format.

I manually decrypt the weird format between the -----BEGIN PGP MESSAGE----- and -----END PGP MESSAGE----- as below:

Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
 charset=utf-8; protected-headers="v1"
Subject: =?UTF-8?B?bW9uZXkg8J+kkQ==?=

happy birthday

So, the problem is this format doesn't provide a independent MIME block for the protected-headers="v1".

I reviewed my other accounts, they all have the mail format with independent MIME block for the protected-headers="v1". So the worked format is that the protected-headers="v1" opens a new nest of MIME block (multipart/mixed) and include the actual mail body in its sub-block.

My conclusion (a guess) is that when you compose a new mail with simple text with the configurations "automatic message format" for the account, then you will get this weird format when K-9 decides to compose the message as plain text.

To Reproduce
Steps to reproduce the behavior:

  1. Configure account to enable "Encrypt message subjects"
  2. Configure account to "Automatic" "Message format"
  3. Compose a new mail with simple text.
  4. Enable the encrypt (i.e. sign + encrypt)
  5. Send the mail.
  6. Receive the mail and read it by Thunderbird and Enigmail powered mail clients.
  7. You can't see actual mail subject just "Encrypted Message"

Expected behavior
Users of Thunderbird and Enigmail powered mail clients should be able to get the actual mail subject.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • K-9 Mail version: 5.806
  • Android version: 10
  • Device: NOKIA 5.1 Plus
  • Account type: IMAP

Additional context
Add any other context about the problem here.

Logs
Please take some time to retrieve logs and attach them here:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with "Encrypt message subjects" enabled and the account's message format set to "Automatic". Inspect the MIME structure produced for a plain-text sign-and-encrypt message and compare it with the independent protected-headers MIME block described in the report. Done means Thunderbird and Enigmail can display the actual subject instead of "Encrypted Message".

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile-dev, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.