thunderbird / thunderbird/thunderbird-android

Change the way we stitch MIME parts together for display

Open
#3,388 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Right now, if a message contains multiple displayable HTML parts, we first concatenate all of them and only then process the resulting HTML (remove JavaScript etc). See https://github.com/k9mail/k-9/blob/e680c84085d82a0c1d0b06f10bf66ff7f42df907/k9mail/src/main/java/com/fsck/k9/mailstore/MessageViewInfoExtractor.java#L186-L257

This approach has lead to several clients being vulnerable to what is described as the Direct Exfiltration attack at https://efail.de/. Due to the way we handle encrypted content we're not vulnerable to EFAIL. But it's still very undesirable that the contents of a preceding MIME part can influence the way the following HTML part is parsed. So we should fix that by processing the different MIME parts individually and then stitching together the processed outputs.

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 with k9mail/src/main/java/com/fsck/k9/mailstore/MessageViewInfoExtractor.java, especially lines 186-257, to understand the current MIME-part processing flow. Change the handling so each displayable HTML part is processed individually before the processed outputs are stitched together; done means preceding MIME content cannot influence parsing of a following part.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, kotlin
Domain
security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.