You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(imap): detect iMIP when method= is missing or mime is application/ics
Two upstream-detection gaps let calendar invitations slip through:
1. Proton Mail Bridge strips the `method=` parameter from the
text/calendar Content-Type header while re-assembling a message
after E2E-decryption. `MessageMapper::getBodyStructureData()`
requires that parameter to flag the message as iMIP, and
`ImapMessageFetcher::getPart()` requires it to populate the
scheduling list — so every Bridge-delivered invitation is
silently dropped.
2. Google's calendar invitations occasionally ship the same event
twice: once as text/calendar and once as application/ics.
Upstream ignored the application/ics part entirely, which means
a mail client fed the "wrong" part (some MUAs prefer the second
attachment) saw nothing.
This commit widens both detection sites to also accept
application/ics, and in the fetcher falls back to the METHOD:
line inside the ICS body when the Content-Type parameter is
missing. The body is only loaded in the fallback path, so the
common case (method= present) keeps the same I/O pattern it had
before.
Added two parameterised test fixtures:
- request_proton_bridge.txt (text/calendar, no method= param)
- request_application_ics.txt (application/ics)
Both are expected to now be flagged as iMIP.
AI-assisted: Claude Code (Claude Opus 4.7)
Signed-off-by: Wolfgang Lubowski <w.lub92@gmail.com>
0 commit comments