mirror of
https://github.com/pyMC-dev/pyMC_Repeater.git
synced 2026-07-27 03:52:47 +02:00
4a055be8df
On-air dest hashes are one byte, so a companion and a room-server (or repeater) identity can share one. The login and text dispatch used `if dest_hash in companion_bridges: ... elif login_helper/text_helper`, so a companion silently shadowed a same-hash room server: its login never reached the room-server handler and failed with Invalid HMAC (e.g. Lake Stevens pubkey f55d.. / hash 0xf5 colliding with a companion). Offer the packet to both handlers when both are registered at the hash; decryption disambiguates — the key owner replies, the other fails HMAC and no-ops. Non-colliding paths are unchanged. Applied to both the LoginServerHandler and TextMessageHandler branches. Adds regression tests covering collision (both invoked), companion-only (server helper skipped), and server-without-companion for each path.