Only drop self-only protocolMessages from non-self senders

fix(process-message): only drop self-only protocolMessages from non-self senders
Only drop self-only protocolMessages from non-self senders3beb08-fix-only-drop-self-only-protocolmessages-from-non-self-cve-2026-48063fixonly drop self protocolmessages non senders

Committed by purpshell

commit message
fix(process-message): only drop self-only protocolMessages from non-self senders

The previous blanket `if (!message.key.fromMe) return` (1d7549df1f)
dropped every inbound protocol message, including legitimate REVOKE,
MESSAGE_EDIT, EPHEMERAL_SETTING and GROUP_MEMBER_LABEL_CHANGE events
from other users — breaking inbound revoke/edit handling entirely.
 
Narrow the guard to the protocol message types that should only ever
originate from our own device (HISTORY_SYNC_NOTIFICATION,
APP_STATE_SYNC_KEY_SHARE, LID_MIGRATION_MAPPING_SYNC,
PEER_DATA_OPERATION_REQUEST_RESPONSE_MESSAGE), mirroring whatsmeow's
`handleProtocolMessage` scope. Cross-user types continue to be
processed by the switch as before.
 
Ref: https://github.com/tulir/whatsmeow/blob/8d3700152a/message.go#L842-L845
Replaces: 1d7549df1f "add guard for protocolMessage processing"

Editor assessment

This commit patches CVE-2026-48063. The subject is long but exact, narrowing the drop rule to self-only protocolMessages from non-self senders, and the body explains why the prior blanket guard was wrong: it discarded legitimate REVOKE, MESSAGE_EDIT, EPHEMERAL_SETTING, and GROUP_MEMBER_LABEL_CHANGE events from other users, breaking inbound revoke and edit handling. It then names the four message types that genuinely originate from our own device and notes the scope mirrors whatsmeow's handleProtocolMessage. A reference link and a Replaces footer pointing at the regressing commit make the history traceable. Thorough causal narrative, correct scope, only length is a minor cost.

Browse categories

More fix examples · Back to search