status-im / status-desktop

Status Desktop client made in Nim & QML
https://status.app
Mozilla Public License 2.0
287 stars 78 forks source link

Change Password flow - abandoning flow when re-encryption is ongoing does not keep old password #14980

Open virginiabalducci opened 3 months ago

virginiabalducci commented 3 months ago

Bug Report

Description

If user abandons the Change Password flow by force closing app, when the app is restarted, app uses the new password instead of the old one.

Steps to reproduce

  1. Go to settings -> Password
  2. Input current password and new password
  3. Select Change Password
  4. While the password re-encryption is ongoing, force close app.
  5. Restart the app

Expected behavior

App to keep the old password (not the new one)

Actual behavior

App saves the new password and this is required to be able to log in.

Additional Information

It may be worth mentioning that this was tested with:

https://github.com/status-im/status-desktop/assets/68916150/97437f0f-519b-427a-a28c-c78179f00fe2

After crash, when app restarts, the old password does not work. User has to enter the new password. https://github.com/status-im/status-desktop/assets/68916150/98c73efa-6c48-419a-9820-3ce5f344eece

App prompted user to save previously saved seed phrase https://github.com/status-im/status-desktop/assets/68916150/1d083f1f-02ed-451f-a218-6d6653b10740

Trying the steps again, changing password and force-closing app. this time no "Quit unexpectedly" error

https://github.com/status-im/status-desktop/assets/68916150/2a43a958-9ce4-4bca-894d-1182b7629927 App is asking for new password

https://github.com/status-im/status-desktop/assets/68916150/5997779a-3d8f-4778-a3db-128dd819fe71

Console logs: testlog imported seed user.txt testlog_passwordtest008 - new user.txt

Could this password issue happen because the re-encryption was very fast? Thanks!

noeliaSD commented 2 months ago

cc: @jrainville I guess this is for your team!