Multibit-Legacy / multibit-hd

Deprecated Bitcoin Wallet
https://multibit.org/blog/2017/07/26/multibit-shutdown.html
Other
169 stars 124 forks source link

Change password behaves poorly if user types in old password #823

Open jim618 opened 8 years ago

jim618 commented 8 years ago

Steps taken: 1) Start up MBHD and open a wallet that has no contacts. 2) Change password from, say, 'abc' to 'xyz'. 3) Close MBHD and restart. 4) Open the same wallet and put in the OLD password i.e. 'abc'. 5) MBHD gives a message that 'the primary wallet did not load, loading a backup'. 6) MBHD then continues ok but loses all the additional payment data.

What is happening is that we load the contacts data as a quick check on the password. No contact data means it does not try to load. Then the most recent wallet is loaded but fails (wrong password). The first rolling backup is tried and that DOES load (the password matches as it is the old password).

With that password the wallet loads ok but the additional payment information does NOT. MBHD continues but is in a bit of a mixed up state. For instance the password recovery would be broken.

Suggest the we also load the payment info before the wallet is loaded as that will fail fast if the password is wrong.

After 3 wallet writes all the old rolling backups disappear so this will only happen if the user uses their old password pretty much the next time they open MBHD.