electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit c506c3e720ea44a974415f443be87df65a90048e
parent 0e49274eae9f497164ecc694729acdcf1188a43a
Author: ThomasV <thomasv@electrum.org>
Date:   Sat, 11 Mar 2017 11:32:00 +0100

fix password message issue #2277

Diffstat:
Mlib/wallet.py | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/lib/wallet.py b/lib/wallet.py @@ -1584,6 +1584,8 @@ class Simple_Deterministic_Wallet(Deterministic_Wallet, Simple_Wallet): self.keystore.check_password(password) def update_password(self, old_pw, new_pw, encrypt=False): + if old_pw is None and self.has_password(): + raise InvalidPassword() self.keystore.update_password(old_pw, new_pw) self.save_keystore() self.storage.set_password(new_pw, encrypt) @@ -1688,11 +1690,14 @@ class Multisig_Wallet(Deterministic_Wallet, P2SH): return [self.keystores[i] for i in sorted(self.keystores.keys())] def update_password(self, old_pw, new_pw, encrypt=False): + if old_pw is None and self.has_password(): + raise InvalidPassword() for name, keystore in self.keystores.items(): if keystore.can_change_password(): keystore.update_password(old_pw, new_pw) self.storage.put(name, keystore.dump()) self.storage.set_password(new_pw, encrypt) + self.storage.write() def check_password(self, password): self.keystore.check_password(password)