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

推荐订阅源

V
Visual Studio Blog
爱范儿
爱范儿
GbyAI
GbyAI
博客园 - 叶小钗
Last Week in AI
Last Week in AI
Jina AI
Jina AI
Microsoft Security Blog
Microsoft Security Blog
云风的 BLOG
云风的 BLOG
C
Check Point Blog
H
Help Net Security
P
Proofpoint News Feed
酷 壳 – CoolShell
酷 壳 – CoolShell
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
大猫的无限游戏
大猫的无限游戏
H
Hackread – Cybersecurity News, Data Breaches, AI and More
B
Blog RSS Feed
Y
Y Combinator Blog
U
Unit 42
T
Tailwind CSS Blog
MyScale Blog
MyScale Blog
N
Netflix TechBlog - Medium
S
SegmentFault 最新的问题
J
Java Code Geeks
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知

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
fix(discord): block channel policy auth bypass · openclaw...
vincentkoc · 2026-04-24 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -8,6 +8,7 @@ Docs: https://docs.openclaw.ai

88
99

### Fixes

1010
11+

- Discord/security: keep native slash-command channel policy from bypassing configured owner or member restrictions, while preserving channel-policy fallback when no stricter access rule exists. (#70711) Thanks @vincentkoc.

1112

- Android/security: stop `ASK_OPENCLAW` intents from auto-sending injected prompts, so external app actions only prefill the draft instead of dispatching it immediately. (#70714) Thanks @vincentkoc.

1213

- Control UI/chat: queue Stop-button aborts across Gateway reconnects so a disconnected active run is canceled on reconnect instead of only clearing local UI state. (#70673) Thanks @chinar-amrutkar.

1314

- Secrets/Windows: strip UTF-8 BOMs from file-backed secrets and keep unavailable ACL checks fail-closed unless trusted file or exec providers explicitly opt into `allowInsecurePath`. (#70662) Thanks @zhanggpcsu.

Original file line numberDiff line numberDiff line change

@@ -230,6 +230,67 @@ describe("Discord native slash commands with commands.allowFrom", () => {

230230

expectNotUnauthorizedReply(interaction);

231231

});

232232
233+

it("authorizes guild slash commands when channel access restrictions include the member", async () => {

234+

const { dispatchSpy, interaction } = await runGuildSlashCommand({

235+

mutateConfig: (cfg) => {

236+

cfg.commands = {

237+

...cfg.commands,

238+

allowFrom: undefined,

239+

};

240+

cfg.channels = {

241+

...cfg.channels,

242+

discord: {

243+

...cfg.channels?.discord,

244+

guilds: {

245+

"345678901234567890": {

246+

channels: {

247+

"234567890123456789": {

248+

enabled: true,

249+

requireMention: false,

250+

users: ["user:123456789012345678"],

251+

},

252+

},

253+

},

254+

},

255+

},

256+

};

257+

},

258+

});

259+

expect(dispatchSpy).toHaveBeenCalledTimes(1);

260+

expectNotUnauthorizedReply(interaction);

261+

});

262+
263+

it("rejects guild slash commands when channel access restrictions exclude the member even if channel policy would allow them", async () => {

264+

const { dispatchSpy, interaction } = await runGuildSlashCommand({

265+

userId: "999999999999999999",

266+

mutateConfig: (cfg) => {

267+

cfg.commands = {

268+

...cfg.commands,

269+

allowFrom: undefined,

270+

};

271+

cfg.channels = {

272+

...cfg.channels,

273+

discord: {

274+

...cfg.channels?.discord,

275+

guilds: {

276+

"345678901234567890": {

277+

channels: {

278+

"234567890123456789": {

279+

enabled: true,

280+

requireMention: false,

281+

users: ["user:123456789012345678"],

282+

},

283+

},

284+

},

285+

},

286+

},

287+

};

288+

},

289+

});

290+

expect(dispatchSpy).not.toHaveBeenCalled();

291+

expectUnauthorizedReply(interaction);

292+

});

293+
233294

it("rejects guild slash commands outside the Discord allowlist when commands.useAccessGroups is false and commands.allowFrom is not configured", async () => {

234295

const { dispatchSpy, interaction } = await runGuildSlashCommand({

235296

mutateConfig: (cfg) => {

Original file line numberDiff line numberDiff line change

@@ -543,12 +543,12 @@ describe("Discord native plugin command dispatch", () => {

543543

"thread-123": {

544544

enabled: true,

545545

requireMention: false,

546-

users: ["owner"],

546+

users: ["user:owner"],

547547

},

548548

"parent-456": {

549549

enabled: true,

550550

requireMention: false,

551-

users: ["owner"],

551+

users: ["user:owner"],

552552

},

553553

},

554554

},

@@ -613,12 +613,12 @@ describe("Discord native plugin command dispatch", () => {

613613

"partial-thread-123": {

614614

enabled: true,

615615

requireMention: false,

616-

users: ["owner"],

616+

users: ["user:owner"],

617617

},

618618

"partial-parent-456": {

619619

enabled: true,

620620

requireMention: false,

621-

users: ["owner"],

621+

users: ["user:owner"],

622622

},

623623

},

624624

},

Original file line numberDiff line numberDiff line change

@@ -243,7 +243,12 @@ function resolveDiscordGuildNativeCommandAuthorized(params: {

243243

configured: hasAccessRestrictions,

244244

allowed: memberAllowed,

245245

};

246-

const fallbackAuthorizers = [policyAuthorizer, ownerAuthorizer, memberAuthorizer];

246+

const hasStricterAccessRestrictions = ownerAuthorizer.configured || memberAuthorizer.configured;

247+

const policyFallbackAuthorizer = {

248+

configured: policyAuthorizer.configured && !hasStricterAccessRestrictions,

249+

allowed: policyAuthorizer.allowed,

250+

};

251+

const fallbackAuthorizers = [policyFallbackAuthorizer, ownerAuthorizer, memberAuthorizer];

247252

return resolveCommandAuthorizedFromAuthorizers({

248253

useAccessGroups: params.useAccessGroups,

249254

authorizers: params.useAccessGroups