Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

Commit

Permalink
Fix panic in router disconnect when fingerprint is nil. Fixes #1548
Browse files Browse the repository at this point in the history
  • Loading branch information
ekoby authored and andrewpmartinez committed Aug 16, 2023
2 parents b42e26f + 62b73c2 commit 66623b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions controller/internal/routes/auth_policy_api_model.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ func MapAuthPolicyToRestModel(model *model.AuthPolicy) (*rest_model.AuthPolicyDe
},
}

if ret.Primary.ExtJWT.AllowedSigners == nil {
ret.Primary.ExtJWT.AllowedSigners = []string{}
}

return ret, nil
}

Expand Down
3 changes: 2 additions & 1 deletion controller/sync_strats/sync_instant.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
"github.com/openziti/fabric/build"
"github.com/openziti/fabric/controller/network"
"github.com/openziti/foundation/v2/debugz"
"github.com/openziti/foundation/v2/genext"
"github.com/openziti/storage/ast"
cmap "github.com/orcaman/concurrent-map/v2"
"go.etcd.io/bbolt"
Expand Down Expand Up @@ -191,7 +192,7 @@ func (strategy *InstantStrategy) RouterDisconnected(router *network.Router) {
log := pfxlog.Logger().WithField("sync_strategy", strategy.Type()).
WithField("routerId", router.Id).
WithField("routerName", router.Name).
WithField("routerFingerprint", *router.Fingerprint)
WithField("routerFingerprint", genext.OrDefault(router.Fingerprint))

existingRtx := strategy.rtxMap.Get(router.Id)

Expand Down

0 comments on commit 66623b3

Please sign in to comment.