mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 14:35:00 +00:00
fix(security): keep DM pairing allowlists out of group auth
This commit is contained in:
@@ -28,7 +28,7 @@ import { resolveThreadSessionKeys } from "../routing/session-key.js";
|
||||
import { withTelegramApiErrorLogging } from "./api-logging.js";
|
||||
import {
|
||||
isSenderAllowed,
|
||||
normalizeAllowFromWithStore,
|
||||
normalizeDmAllowFromWithStore,
|
||||
type NormalizedAllowFrom,
|
||||
} from "./bot-access.js";
|
||||
import type { TelegramMediaRef } from "./bot-message-context.js";
|
||||
@@ -615,7 +615,7 @@ export const registerTelegramHandlers = ({
|
||||
return { allowed: false, reason: "direct-disabled" };
|
||||
}
|
||||
if (dmPolicy !== "open") {
|
||||
const effectiveDmAllow = normalizeAllowFromWithStore({
|
||||
const effectiveDmAllow = normalizeDmAllowFromWithStore({
|
||||
allowFrom,
|
||||
storeAllowFrom,
|
||||
dmPolicy,
|
||||
@@ -1273,7 +1273,7 @@ export const registerTelegramHandlers = ({
|
||||
effectiveGroupAllow,
|
||||
hasGroupAllowOverride,
|
||||
} = eventAuthContext;
|
||||
const effectiveDmAllow = normalizeAllowFromWithStore({
|
||||
const effectiveDmAllow = normalizeDmAllowFromWithStore({
|
||||
allowFrom,
|
||||
storeAllowFrom,
|
||||
dmPolicy,
|
||||
|
||||
Reference in New Issue
Block a user