security: fix AliasCheck panic (update)

Updated `checkServiceExistsOnRemoteServer` to ensure there are services
returned from the specified node before proceeding with the service
matcher.
pull/21510/head
Kiran Naidoo 5 months ago
parent 6f31bfebbe
commit 8c3682afd3

@ -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