mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-29 18:12:52 +00:00
CLI: reset remote URL after trust decline (#57828)
Co-authored-by: zsxsoft <git@zsxsoft.com>
This commit is contained in:
@@ -138,7 +138,7 @@ describe("promptRemoteGatewayConfig", () => {
|
||||
const manualUrl = "wss://manual.example.com:18789";
|
||||
const text: WizardPrompter["text"] = vi.fn(async (params) => {
|
||||
if (params.message === "Gateway WebSocket URL") {
|
||||
expect(params.initialValue).toBe("wss://evil.example:443");
|
||||
expect(params.initialValue).toBe("ws://127.0.0.1:18789");
|
||||
return manualUrl;
|
||||
}
|
||||
return "";
|
||||
|
||||
@@ -132,6 +132,9 @@ export async function promptRemoteGatewayConfig(
|
||||
].join("\n"),
|
||||
"Direct remote",
|
||||
);
|
||||
} else {
|
||||
// Clear the discovered endpoint so the manual prompt falls back to a safe default.
|
||||
suggestedUrl = DEFAULT_GATEWAY_URL;
|
||||
}
|
||||
} else {
|
||||
suggestedUrl = DEFAULT_GATEWAY_URL;
|
||||
|
||||
Reference in New Issue
Block a user