Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disallow canceling on uncancelable pages on T3B1 #4506

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

ibz
Copy link
Contributor

@ibz ibz commented Jan 15, 2025

This PR fixes an issue that happens when the "middle" button is pressed on a page that should not handle middle or left button presses. If, when releasing the "middle" button (left + right), the left one is the first one to be released, this triggered a left button press which would cancel an otherwise uncancelable page, like this one:

image

To reproduce the bug (before the fix):

  • trezorctl device setup
  • keep confirming ever page until you arrive at the page shown in the screenshot above
  • press the left button and keep it pressed
  • while the left button is pressed, press the right button and keep both pressed
  • release the left button
  • now the process is canceled even though it should not be possible to cancel it

Note: this fix affects both the ButtonController and the ButtonPage. Normally one of the two would be enough to fix the issue and this fix indicates that there is some redundancy in the logic that could be perhaps refactored.

@ibz ibz self-assigned this Jan 15, 2025
@ibz ibz linked an issue Jan 15, 2025 that may be closed by this pull request
Copy link

github-actions bot commented Jan 15, 2025

core UI changes device test click test persistence test
T2T1 Model T test(screens) main(screens) test(screens) main(screens) test(screens) main(screens)
T3B1 Safe 3 test(screens) main(screens) test(screens) main(screens) test(screens) main(screens)
T3T1 Safe 5 test(screens) main(screens) test(screens) main(screens) test(screens) main(screens)
All main(screens)

@ibz ibz changed the title Disallow canceling on uncancelable pages Disallow canceling on uncancelable pages on T3B1 Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🔎 Needs review
Development

Successfully merging this pull request may close these issues.

Backup fails unexpectedly when certain keys are pressed on TS3.
1 participant