Skip to content

Fix #523: Strip all non text/plain parts in multipart/alternative if keywords are present

pony hütchen requested to merge pony/schleuder:issue/523 into main

Strip all non text/plain parts in multipart/alternative if keywords are present to stop leaking them, even when it is encapsulated in multipart/mixed. This makes sure that emails with the following structure don't leak keywords:

multipart/mixed
'- multipart/alternative
   |- text/plain
   '- multipart/related
      |- text/html
      '- image/png

This kind of structure is generated by Thunderbird 102.3.0 when images are included in the email. Other email clients might do that as well.

See also:
https://www.rfc-editor.org/rfc/rfc2046#section-5.1.3
https://www.rfc-editor.org/rfc/rfc2046#section-5.1.4
https://www.rfc-editor.org/rfc/rfc2387

fixes #523 (closed)

Merge request reports