mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-19 05:58:09 +00:00
feat(core): not allowing to send empty PIN in T2B1
[no changelog]
This commit is contained in:
parent
90f2b1d790
commit
532f368a14
@ -262,7 +262,10 @@ where
|
|||||||
self.show_real_pin = true;
|
self.show_real_pin = true;
|
||||||
self.update(ctx);
|
self.update(ctx);
|
||||||
}
|
}
|
||||||
PinAction::Enter => return Some(CancelConfirmMsg::Confirmed),
|
PinAction::Enter if !self.is_empty() => {
|
||||||
|
// ENTER is not valid when the PIN is empty
|
||||||
|
return Some(CancelConfirmMsg::Confirmed);
|
||||||
|
}
|
||||||
PinAction::Digit(ch) if !self.is_full() => {
|
PinAction::Digit(ch) if !self.is_full() => {
|
||||||
self.textbox.append(ctx, ch);
|
self.textbox.append(ctx, ch);
|
||||||
// Choosing random digit to be shown next
|
// Choosing random digit to be shown next
|
||||||
|
@ -224,6 +224,13 @@ def test_pin_long(device_handler: "BackgroundDeviceHandler"):
|
|||||||
_input_see_confirm(debug, PIN24)
|
_input_see_confirm(debug, PIN24)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.setup_client(pin=PIN4)
|
||||||
|
def test_pin_empty_cannot_send(device_handler: "BackgroundDeviceHandler"):
|
||||||
|
with prepare(device_handler) as debug:
|
||||||
|
_input_see_confirm(debug, "")
|
||||||
|
_input_see_confirm(debug, PIN4)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.setup_client(pin=PIN24)
|
@pytest.mark.setup_client(pin=PIN24)
|
||||||
def test_pin_long_delete(device_handler: "BackgroundDeviceHandler"):
|
def test_pin_long_delete(device_handler: "BackgroundDeviceHandler"):
|
||||||
with prepare(device_handler) as debug:
|
with prepare(device_handler) as debug:
|
||||||
|
@ -757,6 +757,7 @@
|
|||||||
"TR_test_passphrase_tr.py::test_passphrase_loop_all_characters": "5079e557c3ee648d7778154d65ac0f0200e2ee7e6cc88d46dfb753e314582bed",
|
"TR_test_passphrase_tr.py::test_passphrase_loop_all_characters": "5079e557c3ee648d7778154d65ac0f0200e2ee7e6cc88d46dfb753e314582bed",
|
||||||
"TR_test_pin.py::test_pin_change": "5820a43c03708f208059365711b2a46427c279c7462c2c529a73e5ad560bc36b",
|
"TR_test_pin.py::test_pin_change": "5820a43c03708f208059365711b2a46427c279c7462c2c529a73e5ad560bc36b",
|
||||||
"TR_test_pin.py::test_pin_delete_hold": "8f8be800e39bcfc95236abcfbb69477776885471605fe82da5d81fcfe04c397e",
|
"TR_test_pin.py::test_pin_delete_hold": "8f8be800e39bcfc95236abcfbb69477776885471605fe82da5d81fcfe04c397e",
|
||||||
|
"TR_test_pin.py::test_pin_empty_cannot_send": "40e337e5ef45335d8b521135f4ffca25b5578b6d9af2d91aa9650fb61fde29f1",
|
||||||
"TR_test_pin.py::test_pin_incorrect": "852bf321191682d6cf67c06098ef87571a42f1337609ea90bf476296b344bab4",
|
"TR_test_pin.py::test_pin_incorrect": "852bf321191682d6cf67c06098ef87571a42f1337609ea90bf476296b344bab4",
|
||||||
"TR_test_pin.py::test_pin_long": "d2a86a95b38b8c09c04f0e02a118b62174e835c3ea58aace2d46d9af2a1c561b",
|
"TR_test_pin.py::test_pin_long": "d2a86a95b38b8c09c04f0e02a118b62174e835c3ea58aace2d46d9af2a1c561b",
|
||||||
"TR_test_pin.py::test_pin_long_delete": "6006261b91ea207efb220cd20cf5574e775e8e4ce04eb6f86f924f12fd818a2f",
|
"TR_test_pin.py::test_pin_long_delete": "6006261b91ea207efb220cd20cf5574e775e8e4ce04eb6f86f924f12fd818a2f",
|
||||||
@ -2035,6 +2036,7 @@
|
|||||||
"TT_test_pin.py::test_pin_cancel": "05f5f819be61fec8c7c4341fd23c1bccf78cff93f05d573dd4f528bb0f1edbf5",
|
"TT_test_pin.py::test_pin_cancel": "05f5f819be61fec8c7c4341fd23c1bccf78cff93f05d573dd4f528bb0f1edbf5",
|
||||||
"TT_test_pin.py::test_pin_change": "199d5ccb7760efcaafcc1156274c66d983c4b65c5bac4ebc27b14a060bd1ba4c",
|
"TT_test_pin.py::test_pin_change": "199d5ccb7760efcaafcc1156274c66d983c4b65c5bac4ebc27b14a060bd1ba4c",
|
||||||
"TT_test_pin.py::test_pin_delete_hold": "8fc7930af448875005381482abd1751a980fbb2606d8b764b33bfb3cb1fad483",
|
"TT_test_pin.py::test_pin_delete_hold": "8fc7930af448875005381482abd1751a980fbb2606d8b764b33bfb3cb1fad483",
|
||||||
|
"TT_test_pin.py::test_pin_empty_cannot_send": "0f7d5bd47f9f61133fbba9a1db1486e48dfd53d71d1b7a7d4a22d7062e7ade52",
|
||||||
"TT_test_pin.py::test_pin_incorrect": "27f7eea0673208eddadf462de2da644675c71ab7a96858b3eda9d1299579cd47",
|
"TT_test_pin.py::test_pin_incorrect": "27f7eea0673208eddadf462de2da644675c71ab7a96858b3eda9d1299579cd47",
|
||||||
"TT_test_pin.py::test_pin_long": "42186e29bbae2d52ca2f7616b7812502f485c4677f458f96c2440c8f21b14dff",
|
"TT_test_pin.py::test_pin_long": "42186e29bbae2d52ca2f7616b7812502f485c4677f458f96c2440c8f21b14dff",
|
||||||
"TT_test_pin.py::test_pin_long_delete": "53dced36adc89e59dd0fd1b885d1a1508d5988e77870f12625bc594302067180",
|
"TT_test_pin.py::test_pin_long_delete": "53dced36adc89e59dd0fd1b885d1a1508d5988e77870f12625bc594302067180",
|
||||||
|
Loading…
Reference in New Issue
Block a user