Match Advanced Sync credentials by URL

This commit is contained in:
Joe Julian
2026-04-06 18:13:30 -07:00
parent 8866d9c06f
commit fc59fb4869
4 changed files with 133 additions and 1 deletions
+1
View File
@@ -103,6 +103,7 @@ func ConfigureRemoteBinding(model *vault.Model, input RemoteBindingInput) (Remot
Title: input.CredentialTitle,
Username: input.Username,
Password: input.Password,
URL: input.BaseURL,
Path: append([]string(nil), input.CredentialPath...),
})
+3
View File
@@ -151,6 +151,9 @@ func TestConfigureRemoteBindingStoresProfileAndCredentialsInVault(t *testing.T)
if credentials.Username != "tjulian" || credentials.Password != "token-1" {
t.Fatalf("stored credential entry = %#v, want tjulian/token-1", credentials)
}
if credentials.URL != "https://dav.example.invalid/remote.php/dav" {
t.Fatalf("stored credential entry URL = %q, want remote.php/dav URL", credentials.URL)
}
if binding.LocalVaultPath != "/tmp/family.kdbx" {
t.Fatalf("binding LocalVaultPath = %q, want /tmp/family.kdbx", binding.LocalVaultPath)