Bug: Init command writes longterm.age twice, second write overwrites correct encryption #6
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
In
internal/cli/init.go, after callingvlt.CreatePassphraseUnlocker(passphraseBuffer), theInit()function redundantly re-reads the unlocker's public key, re-encrypts the long-term private key, and overwriteslongterm.age:CreatePassphraseUnlocker(ininternal/vault/unlockers.go) already correctly:longterm.ageThe duplicate code in
Initoverwrites this with a functionally equivalent but separately encrypted blob. This is:CreatePassphraseUnlockerchanges its encryption scheme,Initwould overwrite with the old approachCreatePassphraseUnlockerdoesn't handle this stepFix
Remove the redundant longterm.age encryption and writing from
Init().