Backport of security: fix AliasCheck panic into release/1.19.x (#21341)

* backport of commit aeba4bc804

* backport of commit 8c5b157f7b

---------

Co-authored-by: dduzgun-security <deniz.duzgun@hashicorp.com>
pull/21346/head
hc-github-team-consul-core 6 months ago committed by GitHub
parent 480dedf4a8
commit 32960388b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,3 @@
```release-note:bug
core: Fix panic runtime error on AliasCheck
```

@ -144,6 +144,9 @@ func (c *CheckAlias) runLocal(stopCh chan struct{}) {
type CheckIfServiceIDExists func(*structs.ServiceID) bool
func (c *CheckAlias) checkServiceExistsOnRemoteServer(serviceID *structs.ServiceID) (bool, error) {
if serviceID == nil {
return false, fmt.Errorf("serviceID cannot be nil")
}
args := c.RPCReq
args.Node = c.Node
args.AllowStale = true

Loading…
Cancel
Save