-
-
Notifications
You must be signed in to change notification settings - Fork 672
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
Conversation
|
code ACK. did you intend to do the click-test, like we talked about? |
I actually did not manage to write a proper click test that replicates the bug. Basically I need to simulate releasing one button while the other one is still pressed. This should in theory work, because one can pass a I also thought of somehow making the "middle button" know which button it should release first (since there is always an order in which they are released) - but that means modifying the debug protobuf message somehow, which seems too much for this tiny corner case. What do you think? |
yeah, that would be problematic. let's leave it without a test then. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
QA OK
Info:
|
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:
To reproduce the bug (before the fix):
trezorctl device setup
Note: this fix affects both the
ButtonController
and theButtonPage
. Normally one of the two would be enough to fix the issue, but I decided to fix it in both places that have knowledge of the missing cancel button. This duplication indicates that there is some redundancy in the logic that could be perhaps refactored.