Skip to content

Commit

Permalink
fix: add owner to search certificate in get/post certificate handler
Browse files Browse the repository at this point in the history
  • Loading branch information
fgouteroux committed Jan 22, 2025
1 parent e171ae5 commit 060306f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/certificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 060306f

Please sign in to comment.