Browse Source

security: fix AliasCheck panic (update) (#21510)

Updated `checkServiceExistsOnRemoteServer` to ensure there are services
returned from the specified node before proceeding with the service
matcher.
pull/21512/head
Kiran Naidoo 5 months ago committed by GitHub
parent
commit
88bade6cc0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      agent/checks/alias.go

6
agent/checks/alias.go

@ -164,6 +164,12 @@ RETRY_CALL:
}
return false, err
}
// Do not proceed for nil returned services.
if out.NodeServices == nil {
return false, fmt.Errorf("no services found on node")
}
for _, srv := range out.NodeServices.Services {
if serviceID.Matches(srv.CompoundServiceID()) {
return true, nil

Loading…
Cancel
Save