mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-12 02:23:44 +00:00
fix(security): keep DM pairing allowlists out of group auth
This commit is contained in:
@@ -40,7 +40,7 @@ import {
|
||||
firstDefined,
|
||||
isSenderAllowed,
|
||||
normalizeAllowFrom,
|
||||
normalizeAllowFromWithStore,
|
||||
normalizeDmAllowFromWithStore,
|
||||
} from "./bot-access.js";
|
||||
import {
|
||||
buildGroupLabel,
|
||||
@@ -195,7 +195,7 @@ export const buildTelegramMessageContext = async ({
|
||||
: null;
|
||||
const sessionKey = threadKeys?.sessionKey ?? baseSessionKey;
|
||||
const mentionRegexes = buildMentionRegexes(cfg, route.agentId);
|
||||
const effectiveDmAllow = normalizeAllowFromWithStore({ allowFrom, storeAllowFrom, dmPolicy });
|
||||
const effectiveDmAllow = normalizeDmAllowFromWithStore({ allowFrom, storeAllowFrom, dmPolicy });
|
||||
const groupAllowOverride = firstDefined(topicConfig?.allowFrom, groupConfig?.allowFrom);
|
||||
// Group sender checks are explicit and must not inherit DM pairing-store entries.
|
||||
const effectiveGroupAllow = normalizeAllowFrom(groupAllowOverride ?? groupAllowFrom);
|
||||
|
||||
Reference in New Issue
Block a user