Skip to content

Add locked note handling to export and import #16140

Description

@keshav0479

This issue covers export and import for locked notes, behind featureFlag.noteLock.

Right now exports leak or lose them:

  • JEX and RAW keep the ciphertext but not the key, so a backup restored into a fresh profile can never be decrypted, and a locked note's attachments are missing from the backup entirely
  • Every other format writes the raw ciphertext out as the note body
  • An imported locked note's attachments keep their old ids, so the orphan cleaner can delete them

Backups should stay encrypted and carry the encrypted note lock key with them, so a backup plus the password is always enough to recover. The readable formats should decrypt through the gated load once the session is unlocked, with an unlock prompt before the export and a count of anything skipped. Imports should read the key file and offer decrypting into the current profile key.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions