Protected raw-body path takes a named text/html part with no Content-Disposition as the body #231
Labels
No labels
bug
enhancement
epic
needs-info
needs-triage
ready-for-agent
ready-for-human
svd:go
svd:hold
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dev/mail-mind-mcp#231
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The raw MIME fallback chooses a body part with
EmailMessage.get_body(preferencelist=("plain", "html"))in_message_text(src/mail_mind_mcp/ingest.py). Atext/htmlpart that has aname=parameter but no Content-Disposition header is not an attachment toemail.message, so it can become the body.That text goes into
protected_body_text. In full mode,assess.message_stateputs it into the assessorexcerpt, which is one of the fields that leave the host (ADR 0003 §1).The pinned IMAP body-structure path classifies the same part as an attachment. So the two paths disagree on the same message, and the protected path can send attachment text to the assessor.
Reproduction (generated data only)
A
multipart/mixedmessage whose only part isContent-Type: text/html; charset=utf-8; name=generated-report.html, with no Content-Disposition and the body<p>GeneratedAttachmentOnly</p>:_message_textreturnsprotected=GeneratedAttachmentOnlyand no attachments;assess.excerpt(...)returnsGeneratedAttachmentOnly.Observed on main
518bec4f495267839d05f649dc9b00225b973d01and on PR #230 heade2dd2460228f587de9d453e628a7bbe54c5e495d. This is older than #230, not a regression from it. No live mailbox, deployed mirror or external assessor was used.Ruling
Operator ruling 2026-11-23: track this separately from #224. #224 goes ahead with its four approved read-side fixes and leaves the protected path as it is. Escalation: #224 comment 47056.
Before implementation
Refs #224, #230