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
1 changed files with 2 additions and 0 deletions

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):