SFT-3834: fixed return type for quitting message signing
What changed, and why it matters
This commit fixes a minor return-value bug in the Passport hardware wallet's health-check flow. When the user cancels message signing, the flow now returns 'None' instead of 'False'. This is a correctness fix that likely prevents a downstream caller from misinterpreting a user cancellation as a failed health check. There is no direct evidence in the commit that this is exploitable for theft, bypass, or denial of service.
Treat as a routine bug-fix commit. Review callers of HealthCheckCommonFlow to confirm they handle None correctly and that the previous False value did not cause unintended state transitions or UI behavior. No urgent security response is indicated by the diff alone.
Security signals we found
Return-type correction in user-cancellation path of signing flow
Potential semantic confusion between 'cancelled' and 'failed' health check result
Evidence from the diff
In health_check_common_flow.py, two early-exit paths where the user declines to sign a message were changed from self.set_result(False) to self.set_result(None). The change aligns the cancellation return type with the expected flow contract. A caller that branches on a boolean False versus a None/ sentinel value could behave differently; the patch removes ambiguity between ‘user cancelled’ and ‘operation failed’. The diff is small and does not show any adjacent security controls.
Changed components
ports/stm32/boards/Passport/modules/flows/health_check_common_flow.pyInspect captured patch +2 / −2
diff --git a/ports/stm32/boards/Passport/modules/flows/health_check_common_flow.py b/ports/stm32/boards/Passport/modules/flows/health_check_common_flow.py
index 3e2f4da..8c43ff0 100644
--- a/ports/stm32/boards/Passport/modules/flows/health_check_common_flow.py
+++ b/ports/stm32/boards/Passport/modules/flows/health_check_common_flow.py
@@ -68,7 +68,7 @@ class HealthCheckCommonFlow(Flow):
card_header={'title': 'Message'}).show()
if not result:
- self.set_result(False)
+ self.set_result(None)
return
result = await LongQuestionPage(text='Sign message with this address?\n\n{}'.format(display_address),
@@ -77,7 +77,7 @@ class HealthCheckCommonFlow(Flow):
top_margin=8).show()
if not result:
- self.set_result(False)
+ self.set_result(None)
return
self.goto(self.sign_health_check)
Why this scored 19/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.