1
0

fix bug with undetected incorrect password that can damage wallet

This commit is contained in:
ThomasV
2013-01-06 09:41:06 +01:00
parent 75247de92f
commit 04322b7cc9
5 changed files with 29 additions and 27 deletions

View File

@@ -388,7 +388,7 @@ if __name__ == '__main__':
exit(1)
# check password
try:
wallet.pw_decode( wallet.seed, password)
seed = wallet.decode_seed(password)
except:
print_msg("Error: This password does not decode this wallet.")
exit(1)
@@ -419,7 +419,6 @@ if __name__ == '__main__':
print_msg(known_commands[cmd2])
elif cmd == 'seed':
seed = wallet.pw_decode( wallet.seed, password)
print_msg(seed + ' "' + ' '.join(mnemonic_encode(seed)) + '"')
elif cmd == 'deseed':
@@ -622,11 +621,6 @@ if __name__ == '__main__':
print_msg(h)
elif cmd == 'password':
try:
seed = wallet.pw_decode( wallet.seed, password)
except ValueError:
sys.exit("Error: Password does not decrypt this wallet.")
new_password = prompt_password('New password:')
wallet.update_password(seed, password, new_password)