-
Notifications
You must be signed in to change notification settings - Fork 24
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Hello,
Thank you for the great module/extension! Unfortunately I believe I may have found a bug.
If you register a vault and use a UNC KeyPath you will receive an error when trying to unlock the vault. Move the key file to the local disk and the error goes away.
I am able to successfully open the database with a UNC key file using the regular keepass client. I'm running Microsoft.PowerShell.SecretManagement v0.9.1
Replication Steps:
Import-Module 'SecretManagement.KeePass'
Register-SecretVault -Name 'TestVault' -ModuleName 'SecretManagement.Keepass' -VaultParameters @{
Path = '\\Server.FQDN.com\Share\Folder\TestVault.kdbx'
UseMasterPassword = $true
KeyPath = '\\Server.FQDN.com\Share\Folder\TestVault.keyx'
}
Test-SecretVault -Name 'TestVault' -Verbose # Enter password at prompt
# Receive Errors
# Cleanup vault and re-register
UnRegister-SecretVault -Name 'TestVault'
Register-SecretVault -Name 'TestVault' -ModuleName 'SecretManagement.Keepass' -VaultParameters @{
Path = '\\Server.FQDN.com\Share\Folder\TestVault.kdbx'
UseMasterPassword = $true
KeyPath = 'C:\TestVault.keyx'
}
Test-SecretVault -Name 'TestVault' -Verbose # Enter password at prompt
# Works without error.
Examples
UNC Path
Local Path
I believe I've narrowed down the issue to the [KcpKeyFile]::new() call on line 76 of Connect-KeePassDatabase but have not had time to research further tonight.
I would love to help contribute to the fix (if you need/want help).
Thank you
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working