mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
fix(security): fail closed on unauthenticated discovery routing
This commit is contained in:
committed by
Peter Steinberger
parent
21087c5c70
commit
8942ac04a8
@@ -265,9 +265,11 @@ extension OnboardingView {
|
||||
if self.state.remoteTransport == .direct {
|
||||
return GatewayDiscoveryHelpers.directUrl(for: gateway) ?? "Gateway pairing only"
|
||||
}
|
||||
if let host = GatewayDiscoveryHelpers.sanitizedTailnetHost(gateway.tailnetDns) ?? gateway.lanHost {
|
||||
let portSuffix = gateway.sshPort != 22 ? " · ssh \(gateway.sshPort)" : ""
|
||||
return "\(host)\(portSuffix)"
|
||||
if let target = GatewayDiscoveryHelpers.sshTarget(for: gateway),
|
||||
let parsed = CommandResolver.parseSSHTarget(target)
|
||||
{
|
||||
let portSuffix = parsed.port != 22 ? " · ssh \(parsed.port)" : ""
|
||||
return "\(parsed.host)\(portSuffix)"
|
||||
}
|
||||
return "Gateway pairing only"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user