What changed, and why it matters
This commit changes how the back button behaves during two seed-related screens. In the first screen, it simplifies the logic so that the pending mnemonic is only discarded when leaving from the first word. In the second screen, it removes the back-button handling entirely, meaning pressing back on the finalization screen no longer returns to the previous view. The commit message gives no security context, and the changes appear to be a UI-flow bugfix rather than a security fix, though removing back-button handling could affect user workflow or data persistence in subtle ways.
Treat as a routine UI/flow patch unless additional context emerges. Reviewers should verify that SeedFinalizeView correctly handles RET_CODE__BACK_BUTTON after this removal (e.g., whether the framework prevents reaching that code path or whether button_data indexing can fail). Users on prior versions are not obviously at security risk from this change.
Security signals we found
Back-button control flow altered in seed creation UI
Pending mnemonic discard logic narrowed to first-word exit only
Removal of back-button guard before button_data indexing in finalize view
Potential IndexError or unexpected destination if RET_CODE__BACK_BUTTON is passed through in SeedFinalizeView
Evidence from the diff
In SeedMnemonicEntryView, the patch consolidates the back-button branch: instead of separate return paths for cur_word_index > 0 and == 0, it now discards the pending mnemonic only when cur_word_index == 0 and then always returns BackStackView. In SeedFinalizeView, the entire RET_CODE__BACK_BUTTON branch is removed, so a back press during seed finalization falls through to the button_data indexing logic. This could cause selected_menu_num to be used as an array index even when it represents the back-button constant, potentially raising an IndexError or producing unexpected behavior, depending on how the framework emits RET_CODE__BACK_BUTTON relative to button_data length. There is no explicit security relevance stated by the vendor.
Changed components
src/seedsigner/views/seed_views.pySeedMnemonicEntryViewSeedFinalizeViewController storage pending_mnemonic handlingInspect captured patch +3 / −7
diff --git a/src/seedsigner/views/seed_views.py b/src/seedsigner/views/seed_views.py
index fe29568..a2761f9 100644
--- a/src/seedsigner/views/seed_views.py
+++ b/src/seedsigner/views/seed_views.py
@@ -226,11 +226,10 @@ class SeedMnemonicEntryView(View):
)
if ret == RET_CODE__BACK_BUTTON:
- if self.cur_word_index > 0:
- return Destination(BackStackView)
- else:
+ # Only need to discard when exiting from the very first word
+ if self.cur_word_index == 0:
self.controller.storage.discard_pending_mnemonic()
- return Destination(BackStackView)
+ return Destination(BackStackView)
# ret will be our new mnemonic word
self.controller.storage.update_pending_mnemonic(ret, self.cur_word_index)
@@ -332,9 +331,6 @@ class SeedFinalizeView(View):
button_data=button_data,
)
- if selected_menu_num == RET_CODE__BACK_BUTTON:
- return Destination(BackStackView)
-
if button_data[selected_menu_num] == self.FINALIZE:
seed_num = self.controller.storage.finalize_pending_seed()
return Destination(SeedOptionsView, view_args={"seed_num": seed_num}, clear_history=True)
Why this scored 34/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.