WIP: merge queue: checking main (9e6f3eb) and [#436 + #434] together #456

Closed
mergify[bot] wants to merge 4 commits from mergify/merge-queue/5741935155 into main
4 Commits
Author SHA1 Message Date
Mergify 37a11d5857 Merge of #434 2026-07-08 19:18:15 +00:00
Mergify c2d06f386b Merge of #436 2026-07-08 19:18:15 +00:00
mergify[bot] 1ee6366bec Merge branch 'main' into refactor-307-domain-platform-nits 2026-07-08 13:01:23 +00:00
JMR-dev a1455d541c fix(notifications): verify notification-tap origin before opening a message (#307)
MainActivity is exported (launcher / mailto: / share), so although the
per-message ACTION_OPEN_MESSAGE intent is explicit and carries no manifest
intent-filter, any app could still craft an explicit intent at the exported
component and drive the reader to an arbitrary cached message id (#307,
domain/platform review nit 1).

Trust only this app's own notification taps: openMessage now attaches an
unforgeable sender-token PendingIntent (its creator package is stamped by the
system and cannot be forged), and messageId yields the id only when that token
was minted by us. A foreign caller carries no token, or one attributed to its
own package, so its intent is ignored and logged PII-free via AppLog.

NotificationIntentsTest gains a case proving a token-less ACTION_OPEN_MESSAGE
intent is rejected while the genuine one still resolves; existing cases move to
the new messageId(context, intent) signature.
2026-07-08 07:17:52 -05:00