From 3dd6d075fd25323de45b6a84f9c3b1652d72697c Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Fri, 13 Feb 2026 16:57:04 +0100 Subject: [PATCH] fix: finalize canvas auth fallback hardening (openclaw#14661) thanks @sumleo --- CHANGELOG.md | 1 + src/gateway/server-http.ts | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c75c275dec7..b6c314ee9a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ Docs: https://docs.openclaw.ai ### Fixes - Security/Canvas: serve A2UI assets via the shared safe-open path (`openFileWithinRoot`) to close traversal/TOCTOU gaps, with traversal and symlink regression coverage. (#10525) Thanks @abdelsfane. +- Security/Gateway: breaking default-behavior change - canvas IP-based auth fallback now only accepts machine-scoped addresses (RFC1918, link-local, ULA IPv6, CGNAT); public-source IP matches now require bearer token auth. (#14661) Thanks @sumleo. - Security/WhatsApp: enforce `0o600` on `creds.json` and `creds.json.bak` on save/backup/restore paths to reduce credential file exposure. (#10529) Thanks @abdelsfane. - Security/Gateway + ACP: block high-risk tools (`sessions_spawn`, `sessions_send`, `gateway`, `whatsapp_login`) from HTTP `/tools/invoke` by default with `gateway.tools.{allow,deny}` overrides, and harden ACP permission selection to fail closed when tool identity/options are ambiguous while supporting `allow_always`/`reject_always`. (#15390) Thanks @aether-ai-agent. - Gateway/Tools Invoke: sanitize `/tools/invoke` execution failures while preserving `400` for tool input errors and returning `500` for unexpected runtime failures, with regression coverage and docs updates. (#13185) Thanks @davidrudduck. diff --git a/src/gateway/server-http.ts b/src/gateway/server-http.ts index 63a19865251..feb71a3ee12 100644 --- a/src/gateway/server-http.ts +++ b/src/gateway/server-http.ts @@ -143,10 +143,6 @@ async function authorizeCanvasRequest(params: { if (!clientIp) { return lastAuthFailure ?? { ok: false, reason: "unauthorized" }; } - if (hasAuthorizedWsClientForIp(clients, clientIp)) { - return { ok: true }; - } - return lastAuthFailure ?? { ok: false, reason: "unauthorized" }; // IP-based fallback is only safe for machine-scoped addresses. // Only allow IP-based fallback for private/loopback addresses to prevent