1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 07:28:10 +00:00

client: don't accept non-numerical values for PIN

This commit is contained in:
Pavol Rusnak 2017-11-28 19:59:06 +01:00
parent 69067c9280
commit ae663ffe0c
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -277,6 +277,8 @@ class TextUIMixin(object):
log(" 1 2 3")
log("Please enter %s: " % desc)
pin = getpass.getpass('')
if not pin.isdigit():
raise ValueError('Non-numerical PIN provided')
return proto.PinMatrixAck(pin=pin)
def callback_PassphraseRequest(self, msg):