Skip to content

Commit

Permalink
Backport of security: fix AliasCheck panic into release/1.19.x (#21341)
Browse files Browse the repository at this point in the history
* backport of commit aeba4bc

* backport of commit 8c5b157

---------

Co-authored-by: dduzgun-security <[email protected]>
  • Loading branch information
1 parent 480dedf commit 3296038
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/21339.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
core: Fix panic runtime error on AliasCheck
```
3 changes: 3 additions & 0 deletions agent/checks/alias.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3296038

Please sign in to comment.