Skip to content

Mobile: Entering the wrong password in encryption config causes local notes to be encryted with a corrupt or non-existent encryption key #14975

@mrjo118

Description

@mrjo118

Operating system

Android

Joplin version

3.6.14

Desktop version info

No response

Current behaviour

Reproduction steps:

  1. On a new profile (profile A), setup file system sync
  2. Enable encryption using password aaa
  3. Sync the changes
  4. Create a new profile and open it (profile B)
  5. Setup file system sync to the same directory and click sync
  6. Tap the banner to go to encryption config
  7. Enter password bbb save it, the password will be saved onto the key, but it will ask for the master password above it
  8. Enter password aaa and save it, then trigger sync
  9. Go to the note list and observe that the notes from profile A were still not decrypted
  10. Create a new profile (profile C) and open it
  11. Setup file system sync to the same directory and click sync
  12. Tap the banner to go to encryption config
  13. Enter password aaa save it, then trigger sync
  14. Observe that the notes from profile A were decrypted, but the notes from profile B are not, and there is a banner saying some items cannot be synchronized
  15. Create a new profile (profile D) and open it
  16. Setup file system sync to the same directory and click sync
  17. Tap the banner to go to encryption config
  18. Enter password bbb save it, then trigger sync
  19. Observe that notes from 2 profiles now cannot be decrypted, which means both password aaa and bbb is unable to decrypt items where the wrong encryption password was entered, and the key is therefore corrupted or missing

See video:
https://github.com/user-attachments/assets/7b6d6c9f-4dc2-4331-a2e0-2628d537252c

Also, for a profile which already has encryption enabled in the mobile app, if you disable encryption, then re-enable it with a different password, this will also result in the same issue, without any kind of validation to validate against an existing master password.

This problem was mentioned in the comment here #14659 (comment)

Expected behaviour

It should not be possible to encrypt local notes with a corrupt or non-existent encryption key. All password entry fields (for initial encryption enablement, for entering password on an individual key, and for entering the master password) should all be validated to present an error if the password or not correct or does not match the existing master password when one exists, in the same way as the desktop app handles this

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIt's a bughighHigh priority issuesmobileAll mobile platformssyncsync related issuev3.6

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions