fix(setup): source the console host from the panel hostname, not op.console
The owner setup URL and the limbo login link were built from the admin host (op.console.<root>, with an op.console.localhost fallback) and a hardcoded console.<root>, so an operator who set a custom panel_hostname got an unreachable setup link and a wrong login target. Thread the resolved panel host (defaultPanelHostname) through performSetupMCBind, the MC-bind TUI, and the login system-server env (new FELIS_PANEL_HOSTNAME); the limbo plugin prefers it and keeps console.<root> only as the fallback for an older operator whose env predates it. This also matters for security: the only wired WebAuthn verifier is scoped to the panel host, so passkey enrollment must land on the panel face, never op.console. While here, the limbo login handler checks link status before minting a bind code: an already-linked player is sent straight to the lobby instead of being shown a useless code.
This commit is contained in:
10 files changed
+78
-52
No files matched your search
@@ -185,7 +185,7 @@ func TestOwnerResultCmdCarriesIsOperator(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestMCBindCarriesAuditWarning(t *testing.T) {
|
||||
m := newMCBindModel(context.Background(), &fakeOwnerStore{}, "op.console.example.com", "root")
|
||||
m := newMCBindModel(context.Background(), &fakeOwnerStore{}, "console.example.com", "root")
|
||||
next, _ := m.Update(mcBindMsg{outcome: breakGlassOutcome{
|
||||
ownerIdentity: "mc-uuid-1",
|
||||
setupTokenURL: "https://op.console.example.com/setup?token=t0ken",
|
||||
|
||||
Reference in new issue
Block a user