Skip to content

Commit

Permalink
security: fix AliasCheck panic (#21339)
Browse files Browse the repository at this point in the history
* security: fix AliasCheck panic

* add changelog
  • Loading branch information
dduzgun-security authored Jun 14, 2024
1 parent 6302ef3 commit 7a19d2e
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 7a19d2e

Please sign in to comment.