Skip to content

[Bug]: Feishu dmPolicy=open blocks authorized senders (regression in v2026.5.27) #88046

Description

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

  1. Configure Feishu channel with dmPolicy: "open" and no allowFrom entries
  2. Upgrade to v2026.5.27
  3. Restart gateway
  4. Send a DM to the bot from Feishu
  5. 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.

Metadata

Metadata

Assignees

Labels

P3Low-priority cleanup, docs, polish, ergonomics, or speculative work.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.

Type

No type

Fields

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions