Skip to content

Moving a folder with an unlocked vault keeps the vault's key under the old path #4375

Closed

Description

@AlexAndBear

Initial Checklist

  • I understand this is a bug report and questions should be posted in the Community Discussions
  • I searched issues and couldn’t find anything (or linked relevant results below)

Bug Description

When you move a folder that holds an unlocked vault, the vault's unlocked engine stays registered under the old path. A new vault at that old path then counts as unlocked and opens with the old vault's key, so new files in it would be encrypted with the wrong key.

Renames are handled since #3964 (moveEngine), deletes clear the engines (clearEnginesUnder), but moves (Move to, cut and paste, drag and drop) call neither. UnlockVault.vue skips the password prompt as soon as isUnlocked() is true for the path. Moving the vault root itself is blocked, so only moves of a parent folder are affected.

Reproduction Steps

  1. Unlock a vault docs/x.vault
  2. Move docs into another folder (Move to, cut and paste, or drag and drop)
  3. Create a new docs/x.vault with another password (or rename a locked vault onto that path) and open it

Expected Outcome

The new vault asks for its own password, and the moved vault stays unlocked at its new path (or gets locked).

Actual Outcome

The new vault opens without a password prompt, using the old vault's engine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions