Skip to content

fix: gate RX_LOG channel decryption on rx_log_decrypt - #21

Merged
sg merged 1 commit into
mainfrom
fix/rx-log-decrypt-gate
Jun 16, 2026
Merged

sg merged 1 commit into
mainfrom
fix/rx-log-decrypt-gate

Conversation

@sg

@sg sg commented Jun 16, 2026

Copy link
Copy Markdown
Owner

Problem

With [bot] rx_log_decrypt = false, RX_LOG channel-chat messages were still being decrypted — the firehose logged RX_LOG pl=GRP_TXT … text="…" with cleartext.

Cause

rx_log_decrypt correctly gates the bot's own RX_LOG ingest handler (_on_rx_log_data subscription), but run() called self.mc.set_decrypt_channel_logs(True) unconditionally. That turns on the meshcore library's channel-log decryption, which decodes RX_LOG channel messages and populates payload["message"] — and the always-on firehose (_record_packet) logs it.

Fix

Pass the flag through: set_decrypt_channel_logs(self.cfg.rx_log_decrypt). With rx_log_decrypt=false the 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)

  • Channel commands still work when rx_log_decrypt=false: those arrive via the radio's queued CHANNEL_MSG_RECV/get_msg path (the radio decrypts channels whose keys are programmed into it). rx_log_decrypt only governs the client-side RX_LOG path. To stop a channel being acted on, remove its key from the radio or restrict the command's allowed_channels.
  • Repeat-tracking still decrypts the bot's own sent messages to detect rebroadcasts; that's gated by repeat_tracking, not rx_log_decrypt.

Testing

One-line library-call gate inside the connect path; not unit-testable without a live radio. Verified py_compile and that the call now passes self.cfg.rx_log_decrypt.

@sg
sg merged commit 1215e71 into main Jun 16, 2026
1 check passed
@sg
sg deleted the fix/rx-log-decrypt-gate branch June 16, 2026 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant