Reject secret mv onto the same secret under another name (closes #78)
check / check (push) Waiting to run
check / check (push) Waiting to run
On a case-insensitive filesystem (the macOS default) "Foo" and "foo" name one secret, so `secret mv --force Foo foo` removed the destination, which was the source, and lost the secret with every version. Between vaults the copy replaced the source, and removing the source then removed the copy. Both kinds of move now compare the two secret directories with os.SameFile before changing anything and reject the move if they are one, with or without --force. The tests give one secret two names with symbolic links on the real filesystem. Model: opus-5-5
This commit was merged in pull request #81.
This commit is contained in:
@@ -139,6 +139,9 @@ matching.
|
||||
|
||||
Moves or renames a secret within the current vault.
|
||||
- Fails if the destination already exists
|
||||
- Fails if the destination is the source under another name, such as `foo`
|
||||
for `Foo` on a case-insensitive filesystem (the macOS default); there, to
|
||||
change only the case of a name, move the secret to a third name first
|
||||
- Preserves all versions and metadata
|
||||
|
||||
### Version Management
|
||||
|
||||
Reference in New Issue
Block a user