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 6f31bfebbe
commit 88bade6cc0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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