惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Project Zero
Project Zero
量子位
博客园 - 聂微东
月光博客
月光博客
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
有赞技术团队
有赞技术团队
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
雷峰网
雷峰网
人人都是产品经理
人人都是产品经理
V
Visual Studio Blog
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
Hugging Face - Blog
Hugging Face - Blog
J
Java Code Geeks
V
V2EX
P
Proofpoint News Feed
T
Troy Hunt's Blog
The Hacker News
The Hacker News
H
Hacker News: Front Page
小众软件
小众软件
L
Lohrmann on Cybersecurity
博客园 - 三生石上(FineUI控件)
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
L
LINUX DO - 最新话题
The Last Watchdog
The Last Watchdog
W
WeLiveSecurity
Apple Machine Learning Research
Apple Machine Learning Research
Jina AI
Jina AI
WordPress大学
WordPress大学
G
GRAHAM CLULEY
宝玉的分享
宝玉的分享
博客园 - 【当耐特】
C
CERT Recently Published Vulnerability Notes
S
Secure Thoughts
I
Intezer
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Last Week in AI
Last Week in AI
腾讯CDC
C
Cybersecurity and Infrastructure Security Agency CISA
S
Securelist
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
爱范儿
爱范儿
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 叶小钗
博客园 - Franky
Cloudbric
Cloudbric

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4 test: trim doctor command hotspots · openclaw/openclaw@c66f16a test: isolate agent auth and spawn hotspots · openclaw/openclaw@9285935 test: stabilize MCP startup disposal race · openclaw/openclaw@dd9d2eb test: merge browser contract server suites · openclaw/openclaw@5817a76 test: narrow ollama provider discovery setup · openclaw/openclaw@a0d9598 build: declare qa-lab aimock runtime dependency · openclaw/openclaw@24431e5 test: speed up safe-bins exec harness · openclaw/openclaw@ee856ab test: preserve tool helpers in embedded runner mocks · openclaw/openclaw@acd86a0 refactor: move memory embeddings into provider plugins · openclaw/openclaw@77e6e4c test: reuse system-run temp fixtures · openclaw/openclaw@7e9ff0f test: trim hotspot wait overhead · openclaw/openclaw@12a59b0 Check: avoid duplicate boundary prep · openclaw/openclaw@baf11b8 test: reduce hotspot fixture overhead · openclaw/openclaw@3a59edd feat(ui): overhaul settings and slash command UX (#67819) thanks @Bun… · openclaw/openclaw@2cfb660 QA Matrix: exit cleanly on failure · openclaw/openclaw@42805d2 QA Matrix: isolate scenario coverage · openclaw/openclaw@7e659e1 Matrix: refresh crypto bootstrap state · openclaw/openclaw@94081d8 QA Lab: add provider registry · openclaw/openclaw@bb7e982 Matrix: add plugin changelog · openclaw/openclaw@4acab55 test: trim more hotspot overhead · openclaw/openclaw@f485311 test: trim remaining hotspot tests · openclaw/openclaw@6ba8626 test: narrow hotspot mocks · openclaw/openclaw@dbc8179 test: isolate gemini embedding request helpers · openclaw/openclaw@cd330f5 test: trim memory and mcp hotspots · openclaw/openclaw@fd48dfa test: slim provider registry mocks · openclaw/openclaw@2e08c77 test: harden Parallels update smoke · openclaw/openclaw@1a98090 feat: default Anthropic to Opus 4.7 · openclaw/openclaw@628b454 fix: harden node-host shell payload mutability checks · openclaw/openclaw@75c551e fix: land node-host approval binding for native binaries (#66731) (th… · openclaw/openclaw@29919bb CI: add daily schedule to CodeQL workflow (#67645) · openclaw/openclaw@69d25f5 fix(gateway): capture config hash after plugin auto-enable to prevent… · openclaw/openclaw@8c11210 fix: repair sanitized replay tool results before send (#67620) (thank… · openclaw/openclaw@c3c7a99 fix: restrict HTML timeout short-circuit to transient statuses · openclaw/openclaw@de129a6 fix: keep TUI watchdog bound to active run (#67401) (thanks @xantorres) · openclaw/openclaw@3525273 Gateway/skills: dedupe skills prefix-match + drop dead fallback on log · openclaw/openclaw@d7f489f Extensions/lmstudio: back off inference preload after consecutive fai… · openclaw/openclaw@b555214 TUI/streaming: add watchdog that resets the activity indicator after … · openclaw/openclaw@f44ab20 Agents/tool-loop: enable unknown-tool stream guard by default · openclaw/openclaw@36ed367 Gateway/skills: invalidate session skills snapshot on config write · openclaw/openclaw@b23d59a fix: classify HTML provider error pages correctly (#67642) (thanks @s… · openclaw/openclaw@e588e90 fix(skills): remove unused model-usage import (#67641) · openclaw/openclaw@55f05df docs(changelog): credit codex fix superseded PRs · openclaw/openclaw@e485f24 fix(openai-codex): normalize stale transport metadata in resolution a… · openclaw/openclaw@90801ba CI: pin Docker-related GitHub Actions (#67632) · openclaw/openclaw@f697b01 Android: modernize WebView and discovery API usage (#67627) · openclaw/openclaw@44a6e50 fix(deps): bump hono to 4.12.14 and @hono/node-server to 1.19.14 (GHS… · openclaw/openclaw@fbccc18 fix(deps): bump dompurify to 3.4.0 (#67614) · openclaw/openclaw@2c2dc00 CI: add explicit permissions to all workflow jobs (fixes code-scannin… · openclaw/openclaw@01b7516 fix: register bundled TTS providers and route overrides correctly (#6… · openclaw/openclaw@6ea3cdd fix: align host tilde paths with OS home (#62804) (thanks @stainlu) · openclaw/openclaw@ecfaf64 fix: flush creds queue before reconnect socket open (#67464) (thanks … · openclaw/openclaw@405c63f fix: strip standalone <function> tool call tags from visible text (#6… · openclaw/openclaw@78df859 fix(agents): preserve cli session metadata before transcript persist … · openclaw/openclaw@898fd04 docs(changelog): move cli transcript entry · openclaw/openclaw@c1817c6 fix(agents): normalize cli transcript api field · openclaw/openclaw@3a3fae0 docs(changelog): note cli transcript persistence · openclaw/openclaw@6c343f1 fix(agents): persist cli transcript turns · openclaw/openclaw@b8ef507 fix(msteams): harden security-sensitive flows (#65841) · openclaw/openclaw@c56b56e [Dashboard] Fix exec approval modal overflow for long command content… · openclaw/openclaw@053c5b0 Docs: remove QA changelog entry · openclaw/openclaw@7fd5771 QA: fix private runtime source loading (#67428) · openclaw/openclaw@d5933af docs(gateway): correct protocol.md schema path, hello-ok example, aut… · openclaw/openclaw@489404d CI: pin Node 22 runners to 22.18.0 · openclaw/openclaw@4ffa621 models.authStatus: normalize provider ids + tighten env-backed escape… · openclaw/openclaw@f2fdb9d Update CHANGELOG.md · openclaw/openclaw@7694a92 test(parallels): clean up npm update guard jobs · openclaw/openclaw@045ea7b Plugins: prefer scanDir override paths · openclaw/openclaw@b2974da fix(dreaming): default storage.mode to "separate" so phase blocks sto… · openclaw/openclaw@8c392f0 fix(memory-core): skip dreaming transcript ingestion via session stor… · openclaw/openclaw@a1b01f0 fix: dedupe replayed exec.finished node events (#67281) · openclaw/openclaw@5dcf526
fix(telegram): block unauthorized DM text from cache and prompt conte… · openclaw/openclaw@05a3b44
sallyom · 2026-06-10 · via Recent Commits to openclaw:main

@@ -61,7 +61,6 @@ import {

6161

} from "./bot-handlers.debounce-key.js";

6262

import {

6363

hasInboundMedia,

64-

hasReplyTargetMedia,

6564

isMediaSizeLimitError,

6665

isRecoverableMediaGroupError,

6766

resolveInboundMediaFileId,

@@ -103,7 +102,7 @@ import {

103102

resolveTelegramConversationBaseSessionKey,

104103

resolveTelegramConversationRoute,

105104

} from "./conversation-route.js";

106-

import { enforceTelegramDmAccess } from "./dm-access.js";

105+

import { enforceTelegramDmAccess, isTelegramDmAccessAllowed } from "./dm-access.js";

107106

import { resolveTelegramExecApproval } from "./exec-approval-resolver.js";

108107

import {

109108

isTelegramExecApprovalApprover,

@@ -2744,13 +2743,127 @@ export const registerTelegramHandlers = ({

27442743

} as Message;

27452744

};

274627452747-

const recordEditedMessageForReplyChain = async (

2748-

ctxForDedupe: TelegramUpdateKeyContext,

2749-

msg: Message,

2750-

) => {

2751-

if (shouldSkipUpdate(ctxForDedupe)) {

2746+

type TelegramInboundGate =

2747+

| { allowed: false }

2748+

| {

2749+

allowed: true;

2750+

context: TelegramEventAuthorizationContext;

2751+

effectiveDmAllow: NormalizedAllowFrom;

2752+

};

2753+2754+

// Single authorization gate for every message-like update that can reach the

2755+

// reply-chain cache or dispatch: fresh messages, edits, channel posts. Must run

2756+

// before any cache/dedupe side effect so blocked content is never recorded.

2757+

// dmAccess "challenge" may send a pairing reply; "silent" only decides (edits

2758+

// must never reply).

2759+

const authorizeInboundMessage = async (params: {

2760+

msg: Message;

2761+

chatId: number;

2762+

isGroup: boolean;

2763+

isForum: boolean;

2764+

messageThreadId?: number;

2765+

senderId: string;

2766+

senderUsername: string;

2767+

requireConfiguredGroup: boolean;

2768+

dmAccess: "challenge" | "silent";

2769+

}): Promise<TelegramInboundGate> => {

2770+

const context = await resolveTelegramEventAuthorizationContext({

2771+

chatId: params.chatId,

2772+

isGroup: params.isGroup,

2773+

isForum: params.isForum,

2774+

senderId: params.senderId,

2775+

messageThreadId: params.messageThreadId,

2776+

});

2777+

const {

2778+

dmPolicy,

2779+

resolvedThreadId,

2780+

dmThreadId,

2781+

storeAllowFrom,

2782+

groupConfig,

2783+

topicConfig,

2784+

groupAllowOverride,

2785+

effectiveGroupAllow,

2786+

hasGroupAllowOverride,

2787+

} = context;

2788+

// For DMs, prefer per-DM/topic allowFrom (groupAllowOverride) over account-level allowFrom

2789+

const expandedDmAllowFrom = await expandTelegramAllowFromWithAccessGroups({

2790+

cfg,

2791+

allowFrom: groupAllowOverride ?? allowFrom,

2792+

accountId,

2793+

senderId: params.senderId,

2794+

});

2795+

const effectiveDmAllow = normalizeDmAllowFromWithStore({

2796+

allowFrom: expandedDmAllowFrom,

2797+

storeAllowFrom,

2798+

dmPolicy,

2799+

});

2800+2801+

if (params.requireConfiguredGroup && (!groupConfig || groupConfig.enabled === false)) {

2802+

logVerbose(`Blocked telegram channel ${params.chatId} (channel disabled)`);

2803+

return { allowed: false };

2804+

}

2805+2806+

if (

2807+

shouldSkipGroupMessage({

2808+

isGroup: params.isGroup,

2809+

chatId: params.chatId,

2810+

chatTitle: params.msg.chat.title,

2811+

resolvedThreadId,

2812+

senderId: params.senderId,

2813+

senderUsername: params.senderUsername,

2814+

effectiveGroupAllow,

2815+

hasGroupAllowOverride,

2816+

groupConfig,

2817+

topicConfig,

2818+

})

2819+

) {

2820+

return { allowed: false };

2821+

}

2822+2823+

if (!params.isGroup) {

2824+

const requireTopic =

2825+

groupConfig && "requireTopic" in groupConfig ? groupConfig.requireTopic : undefined;

2826+

if (requireTopic === true && dmThreadId == null) {

2827+

logVerbose(`Blocked telegram DM ${params.chatId}: requireTopic=true but no topic present`);

2828+

return { allowed: false };

2829+

}

2830+

const dmAuthorized =

2831+

params.dmAccess === "challenge"

2832+

? await enforceTelegramDmAccess({

2833+

isGroup: params.isGroup,

2834+

dmPolicy,

2835+

msg: params.msg,

2836+

chatId: params.chatId,

2837+

effectiveDmAllow,

2838+

accountId,

2839+

bot,

2840+

logger,

2841+

upsertPairingRequest: telegramDeps.upsertChannelPairingRequest,

2842+

})

2843+

: await isTelegramDmAccessAllowed({

2844+

dmPolicy,

2845+

msg: params.msg,

2846+

chatId: params.chatId,

2847+

effectiveDmAllow,

2848+

accountId,

2849+

});

2850+

if (!dmAuthorized) {

2851+

return { allowed: false };

2852+

}

2853+

}

2854+2855+

return { allowed: true, context, effectiveDmAllow };

2856+

};

2857+2858+

const recordEditedMessageForReplyChain = async (params: {

2859+

ctxForDedupe: TelegramUpdateKeyContext;

2860+

msg: Message;

2861+

requireConfiguredGroup: boolean;

2862+

}) => {

2863+

if (shouldSkipUpdate(params.ctxForDedupe)) {

27522864

return;

27532865

}

2866+

const msg = params.msg;

27542867

const isGroup = msg.chat.type === "group" || msg.chat.type === "supergroup";

27552868

const isForum = await resolveTelegramForumFlag({

27562869

chatId: msg.chat.id,

@@ -2761,11 +2874,21 @@ export const registerTelegramHandlers = ({

27612874

getChat,

27622875

});

27632876

const normalizedMsg = withResolvedTelegramForumFlag(msg, isForum);

2764-

const resolvedThreadId = resolveTelegramForumThreadId({

2877+

const gate = await authorizeInboundMessage({

2878+

msg: normalizedMsg,

2879+

chatId: normalizedMsg.chat.id,

2880+

isGroup,

27652881

isForum,

27662882

messageThreadId: normalizedMsg.message_thread_id,

2883+

senderId: normalizedMsg.from?.id != null ? String(normalizedMsg.from.id) : "",

2884+

senderUsername: normalizedMsg.from?.username ?? "",

2885+

requireConfiguredGroup: params.requireConfiguredGroup,

2886+

dmAccess: "silent",

27672887

});

2768-

const dmThreadId = !isGroup ? normalizedMsg.message_thread_id : undefined;

2888+

if (!gate.allowed) {

2889+

return;

2890+

}

2891+

const { resolvedThreadId, dmThreadId } = gate.context;

27692892

await recordMessageForReplyChain(normalizedMsg, resolvedThreadId ?? dmThreadId);

27702893

};

27712894

@@ -2775,76 +2898,30 @@ export const registerTelegramHandlers = ({

27752898

if (shouldSkipUpdate(event.ctxForDedupe)) {

27762899

return;

27772900

}

2778-

const eventAuthContext = await resolveTelegramEventAuthorizationContext({

2901+

const gate = await authorizeInboundMessage({

2902+

msg: event.msg,

27792903

chatId: event.chatId,

27802904

isGroup: event.isGroup,

27812905

isForum: event.isForum,

2782-

senderId: event.senderId,

27832906

messageThreadId: event.messageThreadId,

2907+

senderId: event.senderId,

2908+

senderUsername: event.senderUsername,

2909+

requireConfiguredGroup: event.requireConfiguredGroup,

2910+

dmAccess: "challenge",

27842911

});

2912+

if (!gate.allowed) {

2913+

return;

2914+

}

2915+

const { effectiveDmAllow } = gate;

27852916

const {

27862917

dmPolicy,

27872918

resolvedThreadId,

27882919

dmThreadId,

27892920

storeAllowFrom,

27902921

groupConfig,

27912922

topicConfig,

2792-

groupAllowOverride,

27932923

effectiveGroupAllow,

2794-

hasGroupAllowOverride,

2795-

} = eventAuthContext;

2796-

// For DMs, prefer per-DM/topic allowFrom (groupAllowOverride) over account-level allowFrom

2797-

const dmAllowFrom = groupAllowOverride ?? allowFrom;

2798-

const expandedDmAllowFrom = await expandTelegramAllowFromWithAccessGroups({

2799-

cfg,

2800-

allowFrom: dmAllowFrom,

2801-

accountId,

2802-

senderId: event.senderId,

2803-

});

2804-

const effectiveDmAllow = normalizeDmAllowFromWithStore({

2805-

allowFrom: expandedDmAllowFrom,

2806-

storeAllowFrom,

2807-

dmPolicy,

2808-

});

2809-2810-

if (event.requireConfiguredGroup && (!groupConfig || groupConfig.enabled === false)) {

2811-

logVerbose(`Blocked telegram channel ${event.chatId} (channel disabled)`);

2812-

return;

2813-

}

2814-2815-

if (

2816-

shouldSkipGroupMessage({

2817-

isGroup: event.isGroup,

2818-

chatId: event.chatId,

2819-

chatTitle: event.msg.chat.title,

2820-

resolvedThreadId,

2821-

senderId: event.senderId,

2822-

senderUsername: event.senderUsername,

2823-

effectiveGroupAllow,

2824-

hasGroupAllowOverride,

2825-

groupConfig,

2826-

topicConfig,

2827-

})

2828-

) {

2829-

return;

2830-

}

2831-2832-

if (!event.isGroup && (hasInboundMedia(event.msg) || hasReplyTargetMedia(event.msg))) {

2833-

const dmAuthorized = await enforceTelegramDmAccess({

2834-

isGroup: event.isGroup,

2835-

dmPolicy,

2836-

msg: event.msg,

2837-

chatId: event.chatId,

2838-

effectiveDmAllow,

2839-

accountId,

2840-

bot,

2841-

logger,

2842-

upsertPairingRequest: telegramDeps.upsertChannelPairingRequest,

2843-

});

2844-

if (!dmAuthorized) {

2845-

return;

2846-

}

2847-

}

2924+

} = gate.context;

2848292528492926

const promptContextMinTimestampMs = normalizePromptContextMinTimestampMs(

28502927

resolveTelegramSessionState({

@@ -2950,7 +3027,11 @@ export const registerTelegramHandlers = ({

29503027

if (!msg) {

29513028

return;

29523029

}

2953-

await recordEditedMessageForReplyChain(ctx, msg);

3030+

await recordEditedMessageForReplyChain({

3031+

ctxForDedupe: ctx,

3032+

msg,

3033+

requireConfiguredGroup: false,

3034+

});

29543035

});

2955303629563037

// Handle channel posts — enables bot-to-bot communication via Telegram channels.

@@ -2991,6 +3072,10 @@ export const registerTelegramHandlers = ({

29913072

if (!post) {

29923073

return;

29933074

}

2994-

await recordEditedMessageForReplyChain(ctx, normalizeChannelPostMessage(post));

3075+

await recordEditedMessageForReplyChain({

3076+

ctxForDedupe: ctx,

3077+

msg: normalizeChannelPostMessage(post),

3078+

requireConfiguredGroup: true,

3079+

});

29953080

});

29963081

};