client: don't accept non-numerical values for PIN
This commit is contained in:
parent
69067c9280
commit
ae663ffe0c
|
@ -277,6 +277,8 @@ class TextUIMixin(object):
|
||||||
log(" 1 2 3")
|
log(" 1 2 3")
|
||||||
log("Please enter %s: " % desc)
|
log("Please enter %s: " % desc)
|
||||||
pin = getpass.getpass('')
|
pin = getpass.getpass('')
|
||||||
|
if not pin.isdigit():
|
||||||
|
raise ValueError('Non-numerical PIN provided')
|
||||||
return proto.PinMatrixAck(pin=pin)
|
return proto.PinMatrixAck(pin=pin)
|
||||||
|
|
||||||
def callback_PassphraseRequest(self, msg):
|
def callback_PassphraseRequest(self, msg):
|
||||||
|
|
Loading…
Reference in New Issue