mirror of https://github.com/hashicorp/consul
Backport of security: fix AliasCheck panic (update) into release/1.19.x (#21511)
backport of commit 8c3682afd3
Co-authored-by: Kiran Naidoo <kiran@kiran.za.org>
pull/21515/head
parent
73d46d6350
commit
1e3ea57e0a
|
@ -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…
Reference in New Issue