Skip to content

Commit 90b85b2

Browse files
committed
fix(gateway): restrict legacy route inheritance to channel-aligned keys
1 parent 8a7d1aa commit 90b85b2

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Docs: https://docs.openclaw.ai
2323
- Plugins/SDK subpath parity: add channel-specific plugin SDK subpaths for Discord, Slack, Signal, iMessage, WhatsApp, and LINE; migrate bundled plugin entrypoints to scoped subpaths/core with CI guardrails; and keep `openclaw/plugin-sdk` root import compatibility for existing external plugins. (#33737) thanks @gumadeiras.
2424
- Routing/session duplicate suppression synthesis: align shared session delivery-context inheritance, channel-paired route-field merges, and reply-surface target matching so dmScope=main turns avoid cross-surface duplicate replies while thread-aware forwarding keeps intended routing semantics. (from #33629, #26889, #17337, #33250) Thanks @Yuandiaodiaodiao, @kevinwildenradt, @Glucksberg, and @bmendonca3.
2525
- Routing/legacy session route inheritance: preserve external route metadata inheritance for legacy channel session keys (`agent:<agent>:<channel>:<peer>` and `...:thread:<id>`) so `chat.send` does not incorrectly fall back to webchat when valid delivery context exists. Follow-up to #33786.
26+
- Routing/legacy route guard tightening: require legacy session-key channel hints to match the saved delivery channel before inheriting external routing metadata, preventing custom namespaced keys like `agent:<agent>:work:<ticket>` from inheriting stale non-webchat routes.
2627
- Security/auth labels: remove token and API-key snippets from user-facing auth status labels so `/status` and `/models` do not expose credential fragments. (#33262) thanks @cu1ch3n.
2728
- Auth/credential semantics: align profile eligibility + probe diagnostics with SecretRef/expiry rules and harden browser download atomic writes. (#33733) thanks @joshavant.
2829
- Security/audit denyCommands guidance: suggest likely exact node command IDs for unknown `gateway.nodes.denyCommands` entries so ineffective denylist entries are easier to correct. (#29713) thanks @liquidhorizon88-bot.

src/gateway/server-methods/chat.directive-tags.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ describe("chat directive tag stripping for non-streaming final payloads", () =>
570570
context,
571571
respond,
572572
idempotencyKey: "idem-custom-no-cross-route",
573-
sessionKey: "agent:main:work",
573+
sessionKey: "agent:main:work:ticket-123",
574574
expectBroadcast: false,
575575
});
576576

src/gateway/server-methods/chat.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,9 @@ export const chatHandlers: GatewayRequestHandlers = {
876876
CHANNEL_SCOPED_SESSION_SHAPES.has(part),
877877
);
878878
const hasLegacyChannelPeerShape =
879-
!isChannelScopedSession && typeof sessionScopeParts[1] === "string";
879+
!isChannelScopedSession &&
880+
typeof sessionScopeParts[1] === "string" &&
881+
sessionChannelHint === routeChannelCandidate;
880882
// Only inherit prior external route metadata for channel-scoped sessions.
881883
// Channel-agnostic sessions (main, direct:<peer>, etc.) can otherwise
882884
// leak stale routes across surfaces.

0 commit comments

Comments
 (0)