Repository navigation
fix: gate RX_LOG channel decryption on rx_log_decrypt - #21
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
With
[bot] rx_log_decrypt = false, RX_LOG channel-chat messages were still being decrypted — the firehose loggedRX_LOG pl=GRP_TXT … text="…"with cleartext.Cause
rx_log_decryptcorrectly gates the bot's own RX_LOG ingest handler (_on_rx_log_datasubscription), butrun()calledself.mc.set_decrypt_channel_logs(True)unconditionally. That turns on the meshcore library's channel-log decryption, which decodes RX_LOG channel messages and populatespayload["message"]— and the always-on firehose (_record_packet) logs it.Fix
Pass the flag through:
set_decrypt_channel_logs(self.cfg.rx_log_decrypt). Withrx_log_decrypt=falsethe library no longer decodes RX_LOG channel text → firehose is capture-only, matching the config's documented intent.Notes (behavior that is not changed, and shouldn't be)
rx_log_decrypt=false: those arrive via the radio's queuedCHANNEL_MSG_RECV/get_msgpath (the radio decrypts channels whose keys are programmed into it).rx_log_decryptonly governs the client-side RX_LOG path. To stop a channel being acted on, remove its key from the radio or restrict the command'sallowed_channels.repeat_tracking, notrx_log_decrypt.Testing
One-line library-call gate inside the connect path; not unit-testable without a live radio. Verified
py_compileand that the call now passesself.cfg.rx_log_decrypt.