mirror of https://github.com/status-im/consul.git
security: fix AliasCheck panic (#21339)
* security: fix AliasCheck panic * add changelog
This commit is contained in:
parent
6302ef31fc
commit
7a19d2e7a4
|
@ -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
|
type CheckIfServiceIDExists func(*structs.ServiceID) bool
|
||||||
|
|
||||||
func (c *CheckAlias) checkServiceExistsOnRemoteServer(serviceID *structs.ServiceID) (bool, error) {
|
func (c *CheckAlias) checkServiceExistsOnRemoteServer(serviceID *structs.ServiceID) (bool, error) {
|
||||||
|
if serviceID == nil {
|
||||||
|
return false, fmt.Errorf("serviceID cannot be nil")
|
||||||
|
}
|
||||||
args := c.RPCReq
|
args := c.RPCReq
|
||||||
args.Node = c.Node
|
args.Node = c.Node
|
||||||
args.AllowStale = true
|
args.AllowStale = true
|
||||||
|
|
Loading…
Reference in New Issue