Clear the passphrase quick access when returning
What changed, and why it matters
This commit adds one line that turns off a 'quick access' toggle for the passphrase feature whenever the passphrase text is cleared. Without this fix, the toggle could stay enabled unexpectedly, potentially causing the device to remember or expose passphrase-related settings in a state the user did not intend. The change is defensive and improves safety, but the diff alone does not prove an exploitable vulnerability exists.
Review the full passphrase settings flow to confirm no other UI state or sensitive buffers remain uncleared on return/cancel events, and consider adding automated UI-state tests for the quick-access toggle.
Security signals we found
UI state reset now includes a security-relevant toggle
Passphrase-related UI state is being explicitly cleared
Single-line defensive fix in passphrase settings widget
Evidence from the diff
In gui_passphrase_setting_widgets.c, the GuiPassphraseWidgetClearText() function now calls lv_obj_clear_state(g_passphraseQuickAccessSwitch, LV_STATE_CHECKED) after clearing the passphrase input fields. This ensures the quick-access switch is unchecked whenever the passphrase UI is reset. The patch is minimal and appears to address a state-consistency issue in the UI: the passphrase text and quick-access toggle are now cleared together, reducing the chance that a stale checked state persists.
Changed components
src/ui/gui_widgets/setting/gui_passphrase_setting_widgets.cPassphrase settings UIQuick access passphrase switchInspect captured patch +1 / −0
diff --git a/src/ui/gui_widgets/setting/gui_passphrase_setting_widgets.c b/src/ui/gui_widgets/setting/gui_passphrase_setting_widgets.c
index 98883d3..26f11bf 100644
--- a/src/ui/gui_widgets/setting/gui_passphrase_setting_widgets.c
+++ b/src/ui/gui_widgets/setting/gui_passphrase_setting_widgets.c
@@ -309,4 +309,5 @@ void GuiPassphraseWidgetClearText(void)
if (g_setPassPhraseKb != NULL) {
lv_keyboard_set_textarea(g_setPassPhraseKb->kb, g_passphraseWidget.inputTa);
}
+ lv_obj_clear_state(g_passphraseQuickAccessSwitch, LV_STATE_CHECKED);
}
\ No newline at end of file
Why this scored 46/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.