Description
Bug type
Regression (worked before v2026.5.27, now fails)
Summary
When channels.feishu.dmPolicy is set to "open", Feishu direct messages are blocked with "blocked unauthorized sender" even though dmPolicy=open should allow all senders without checking an allowlist.
Steps to reproduce
- Configure Feishu channel with
dmPolicy: "open" and no allowFrom entries
- Upgrade to v2026.5.27
- Restart gateway
- Send a DM to the bot from Feishu
- Message is received but blocked
Expected behavior
With dmPolicy: "open", any sender should be allowed to DM the bot without needing to be in any allowFrom list.
Actual behavior
feishu[default]: received message from ou_xxx in oc_xxx (p2p)
feishu[default]: blocked unauthorized sender ou_xxx (dmPolicy=open)
Root Cause Analysis
In senderGateForDirect (file src/channels/message-access/..., function senderGateForDirect):
if (params.policy.dmPolicy === "open") {
if (dm.hasWildcard) return allow("dm_policy_open");
if (dm.match.matched) return allow("dm_policy_allowlisted");
return block("dm_policy_not_allowlisted");
}
hasWildcard is defined as directEntries.includes("*") — which is false when the allowFrom list is empty (the typical/normal config for dmPolicy=open). This causes the sender to be blocked even though dmPolicy=open should grant unconditional access.
The check for dmPolicy === "open" should immediately return allow("dm_policy_open") without checking hasWildcard or match.matched.
Workaround
Add "allowFrom": ["*"] to channels.feishu config to trigger the wildcard path.
Environment
- OpenClaw version: 2026.5.27
- OS: macOS 26.5 (arm64)
- Install method: npm global
- Channel: Feishu (websocket mode)
Logs
# Before fix (blocked):
feishu[default]: received message from ou_4762e3d90a90b4fc41ec53a36657386e
feishu[default]: blocked unauthorized sender ou_4762e3d90a90b4fc41ec53a36657386e (dmPolicy=open)
# After workaround (allowFrom: ["*"]):
feishu[default]: received message from ou_4762e3d90a90b4fc41ec53a36657386e
feishu[default]: dispatching to agent (session=agent:main:feishu:direct:ou_4762e3d90a90b4fc41ec53a36657386e)
feishu[default]: dispatch complete (queuedFinal=true, replies=1)
Impact
High — dmPolicy=open (the simplest/recommended DM policy) is completely broken on Feishu. Users who upgrade to v2026.5.27 without the workaround will experience silent message drops.
Description
Bug type
Regression (worked before v2026.5.27, now fails)
Summary
When
channels.feishu.dmPolicyis set to"open", Feishu direct messages are blocked with"blocked unauthorized sender"even though dmPolicy=open should allow all senders without checking an allowlist.Steps to reproduce
dmPolicy: "open"and noallowFromentriesExpected behavior
With
dmPolicy: "open", any sender should be allowed to DM the bot without needing to be in any allowFrom list.Actual behavior
Root Cause Analysis
In
senderGateForDirect(filesrc/channels/message-access/..., functionsenderGateForDirect):hasWildcardis defined asdirectEntries.includes("*")— which isfalsewhen the allowFrom list is empty (the typical/normal config for dmPolicy=open). This causes the sender to be blocked even though dmPolicy=open should grant unconditional access.The check for
dmPolicy === "open"should immediately returnallow("dm_policy_open")without checkinghasWildcardormatch.matched.Workaround
Add
"allowFrom": ["*"]tochannels.feishuconfig to trigger the wildcard path.Environment
Logs
Impact
High — dmPolicy=open (the simplest/recommended DM policy) is completely broken on Feishu. Users who upgrade to v2026.5.27 without the workaround will experience silent message drops.