thunderbird / thunderbird/thunderbird-android
Change the way we stitch MIME parts together for display
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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