Bypass plugins/hw_wallet/qt.py bug when setting initial devices password
This commit is contained in:
@@ -89,10 +89,10 @@ class DigitalBitbox_Client():
|
|||||||
return pbkdf2.PBKDF2(key, 'Digital Bitbox', iterations = 20480, macmodule = hmac, digestmodule = hashlib.sha512).read(64).encode('hex')
|
return pbkdf2.PBKDF2(key, 'Digital Bitbox', iterations = 20480, macmodule = hmac, digestmodule = hashlib.sha512).read(64).encode('hex')
|
||||||
|
|
||||||
|
|
||||||
def backup_password_dialog(self, confirm=False):
|
def backup_password_dialog(self):
|
||||||
msg = _("Enter the password used when the backup was created:")
|
msg = _("Enter the password used when the backup was created:")
|
||||||
while True:
|
while True:
|
||||||
password = self.handler.get_passphrase(msg, confirm)
|
password = self.handler.get_passphrase(msg, False)
|
||||||
if password is None:
|
if password is None:
|
||||||
return None
|
return None
|
||||||
if len(password) < 4:
|
if len(password) < 4:
|
||||||
@@ -103,9 +103,9 @@ class DigitalBitbox_Client():
|
|||||||
return str(password)
|
return str(password)
|
||||||
|
|
||||||
|
|
||||||
def password_dialog(self, msg, confirm=False):
|
def password_dialog(self, msg):
|
||||||
while True:
|
while True:
|
||||||
password = self.handler.get_passphrase(msg, confirm)
|
password = self.handler.get_passphrase(msg, False)
|
||||||
if password is None:
|
if password is None:
|
||||||
return False
|
return False
|
||||||
if len(password) < 4:
|
if len(password) < 4:
|
||||||
@@ -126,7 +126,7 @@ class DigitalBitbox_Client():
|
|||||||
"Enter a new password below.\r\n\r\n REMEMBER THE PASSWORD!\r\n\r\n" \
|
"Enter a new password below.\r\n\r\n REMEMBER THE PASSWORD!\r\n\r\n" \
|
||||||
"You cannot access your coins or a backup without the password.\r\n" \
|
"You cannot access your coins or a backup without the password.\r\n" \
|
||||||
"A backup is saved automatically when generating a new wallet.")
|
"A backup is saved automatically when generating a new wallet.")
|
||||||
if self.password_dialog(msg, True):
|
if self.password_dialog(msg):
|
||||||
reply = self.hid_send_plain('{"password":"' + self.password + '"}')
|
reply = self.hid_send_plain('{"password":"' + self.password + '"}')
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|||||||
Reference in New Issue
Block a user