From 060306f9b9ab8add763809fc2ea0aaf4d8ad956a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Gouteroux?= Date: Wed, 22 Jan 2025 11:03:00 +0100 Subject: [PATCH] fix: add owner to search certificate in get/post certificate handler --- api/certificate.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/certificate.go b/api/certificate.go index f0a1e90..d40304d 100644 --- a/api/certificate.go +++ b/api/certificate.go @@ -210,7 +210,7 @@ func GetCertificateHandler() http.HandlerFunc { } idx := slices.IndexFunc(data, func(c certstore.Certificate) bool { - return c.Domain == certData.Domain && c.Issuer == certData.Issuer + return c.Domain == certData.Domain && c.Issuer == certData.Issuer && c.Owner == certData.Owner }) var owner string @@ -318,7 +318,7 @@ func CreateCertificateHandler(logger log.Logger, proxyClient *http.Client) http. } idx := slices.IndexFunc(data, func(c certstore.Certificate) bool { - return c.Domain == certData.Domain && c.Issuer == certData.Issuer + return c.Domain == certData.Domain && c.Issuer == certData.Issuer && c.Owner == certData.Owner }) if idx >= 0 {