openclaw - 💡(How to fix) Fix [Bug]: Feishu dmPolicy=open blocks authorized senders (regression in v2026.5.27)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

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.

Error Message

# 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)

Root Cause

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.

Fix Action

Workaround

Add "allowFrom": ["*"] to channels.feishu config to trigger the wildcard path.

Code Example

feishu[default]: received message from ou_xxx in oc_xxx (p2p)
feishu[default]: blocked unauthorized sender ou_xxx (dmPolicy=open)

---

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");
}

---

# 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)
RAW_BUFFERClick to expand / collapse

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.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

With dmPolicy: "open", any sender should be allowed to DM the bot without needing to be in any allowFrom list.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: Feishu dmPolicy=open blocks authorized senders (regression in v2026.5.27)