carddav: make Discover fail when target is empty

This commit is contained in:
Simon Ser 2020-02-19 16:32:35 +01:00
parent 4b24edf624
commit 7d2b6a3902
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48

View File

@ -36,7 +36,7 @@ func Discover(domain string) (string, error) {
target := strings.TrimSuffix(addr.Target, ".")
if target == "" {
return "", nil
return "", fmt.Errorf("carddav: empty target in SRV record")
}
u := url.URL{Scheme: "https"}