Skip to content

Commit

Permalink
Fix edge case where filterTag == '='
Browse files Browse the repository at this point in the history
Signed-off-by: Lucas Thiesen <lucas.thiesen@zalando.de>
  • Loading branch information
lucastt committed Nov 3, 2023
1 parent 2ef91ec commit a7b5efc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion aws/acm.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func getACMCertificateSummaries(api acmiface.ACMAPI, filterTag string) ([]*acm.C
return true
})

if tag := strings.Split(filterTag, "="); len(tag) == 2 {
if tag := strings.Split(filterTag, "="); filterTag != "=" && len(tag) == 2 {
return filterCertificatesByTag(api, acmSummaries, tag[0], tag[1])
}

Expand Down
2 changes: 1 addition & 1 deletion aws/iam.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func (p *iamCertificateProvider) GetCertificates() ([]*certs.CertificateSummary,
}
list := make([]*certs.CertificateSummary, 0)
for _, o := range serverCertificatesMetadata {
if kv := strings.Split(p.filterTag, "="); len(kv) == 2 {
if kv := strings.Split(p.filterTag, "="); p.filterTag != "=" && len(kv) == 2 {
hasTag, err := certHasTag(p.api, *o.ServerCertificateName, kv[0], kv[1])
if err != nil {
return nil, err
Expand Down

0 comments on commit a7b5efc

Please sign in to comment.