chore(core): fix log formatting in `trezor/wire/thp/channel.py`
What changed, and why it matters
This is a one-character logging fix in a Trezor firmware debug message. It adds a colon and space to a log string so the formatting reads correctly. There is no security relevance: no behavior changes, no crash, no data exposure, and no vulnerability is introduced or fixed.
No security action needed. Treat as a normal cosmetic/logging cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit changes a single debug log line in core/src/trezor/wire/thp/channel.py. The original format string concatenated ‘Unexpected control byte’ directly with the hexlified message; the patch inserts ‘: ’ between the label and the value. This only affects output when debug is true and has no functional impact on protocol handling, error raising, or control flow.
Changed components
core/src/trezor/wire/thp/channel.pyInspect captured patch +1 / −1
diff --git a/core/src/trezor/wire/thp/channel.py b/core/src/trezor/wire/thp/channel.py
index dfe875b63..d6ce8a288 100644
--- a/core/src/trezor/wire/thp/channel.py
+++ b/core/src/trezor/wire/thp/channel.py
@@ -247,7 +247,7 @@ class Channel:
if expected_ctrl_byte is None or not expected_ctrl_byte(ctrl_byte):
if __debug__:
- self._log("Unexpected control byte", utils.hexlify_if_bytes(msg))
+ self._log("Unexpected control byte: ", utils.hexlify_if_bytes(msg))
raise ThpError("Unexpected control byte")
# 2: Handle message with unexpected sequential bit
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.