mirror of
https://github.com/linagora/tmail-flutter.git
synced 2026-12-06 16:04:20 +00:00
In replaceImageBase64ToImageCID, the early-return path blindly returned all inline attachments even when none were referenced by a cid: img tag in the HTML body. This caused orphaned inline blobs (CID present in JMAP metadata but no body reference) to be silently re-attached on every reply/forward, propagating malformed MIME structure across the thread. Fix 1: early-return now checks for actual img[src^="cid:"] body references before including any attachment — orphaned entries are dropped. Fix 2: after the base64 loop, scan remaining cid: img tags and include their attachments so images that failed to download are still forwarded.