Commit 49b4148
fix: use consistent vaultID for audit key storage and retrieval
Bug: Audit HMAC verification was failing because vaultID was inconsistent:
- During init: vaultID = filepath.Base(vaultDir) (e.g., ".pass-cli")
- During verify: vaultID = filepath.Abs(vaultPath) (e.g., "C:\Users\...\vault.enc")
This caused GetOrCreateAuditKey() to create a new key during verification
instead of retrieving the original, making all HMAC signatures invalid.
Fix: Updated getVaultID() in cmd/helpers.go to use directory name
(filepath.Base(filepath.Dir(vaultPath))) to match initialization behavior.
Now audit key is consistently stored/retrieved with same vaultID.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 1489f46 commit 49b4148
1 file changed
+5
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
105 | 103 | | |
106 | 104 | | |
107 | 105 | | |
| |||
0 commit comments