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

Fix panic in router disconnect when fingerprint is nil. Fixes #1548 #1585

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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()).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already fixed. Not sure why it doesn't show up that way.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird. I didn't add this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also this isn't what I named the PR.

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
Loading