What changed, and why it matters
This commit only adds extra debug logging messages that record when a 'ButtonRequest' event is ignored by the Trezor device's user interface code. It does not change program behavior, fix a bug, or alter security logic. There is no indication this is a security patch.
No security action needed. Treat as routine diagnostic/logging change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff adds two conditional log.debug() calls inside core/src/trezor/ui/init.py, both guarded by debug. One logs when a ButtonRequest task is not started because the button_request_box is not empty; the other logs when a ButtonRequest response is ignored because self.context is None. No functional code paths, return values, or state handling are changed.
Changed components
core/src/trezor/ui/__init__.pyInspect captured patch +8 / −0
diff --git a/core/src/trezor/ui/__init__.py b/core/src/trezor/ui/__init__.py
index d3ab94be..a0342b24 100644
--- a/core/src/trezor/ui/__init__.py
+++ b/core/src/trezor/ui/__init__.py
@@ -279,6 +279,12 @@ class Layout(Generic[T]):
is_done = loop.mailbox() # (see below)
self.button_request_task = self._handle_button_requests(is_done)
self._start_task(self.button_request_task)
+ elif __debug__ and not self.button_request_box.is_empty():
+ log.debug(
+ __name__,
+ "ButtonRequest task not started, %s ignored",
+ self.button_request_box.value,
+ )
result = await self.result_box
assert CURRENT_LAYOUT is None # the screen is blank now
@@ -349,6 +355,8 @@ class Layout(Generic[T]):
return False
if self.context is None:
+ if __debug__:
+ log.debug(__name__, "ButtonRequest ignored: %s", res)
return False
if __debug__ and not self.button_request_box.is_empty():
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.