fix(servers): guard stored credentials and reconcile remote session status

Reject a server address change to a new origin unless a password or
pairing is supplied, so the stored password is never sent to another
host. Test connection now checks the edited values and warns when an
origin change needs credentials. Replay and reconcile remote session
statuses on stream reconnect and browser resync so linked-server
sessions no longer stay busy. Treat malformed server session URLs as
not found instead of throwing.
This commit is contained in:
Chris Scott committed 2026-10-18 21:53:19 -04:00
1 parent 3a7227a602
commit 5586120ba2
18 files changed
+843 -62

No files matched your search

+14
View File
@@ -2,3 +2,17 @@
export function trimUrlTrailingSlashes(url: string): string {
return url.trim().replace(/\/+$/, '')
}
/** Reports whether two URLs share the same origin; false when either URL is invalid. */
export function haveSameUrlOrigin(first: string, second: string): boolean {
const origin = readUrlOrigin(first)
return origin !== null && origin === readUrlOrigin(second)
}
function readUrlOrigin(value: string): string | null {
try {
return new URL(value).origin
} catch {
return null
}
}