mirror of
https://github.com/openclaw/openclaw.git
synced 2026-02-19 18:39:20 -05:00
fix: treat '*' tool allowlist as valid
This commit is contained in:
@@ -24,6 +24,7 @@ Docs: https://docs.openclaw.ai
|
||||
### Fixes
|
||||
|
||||
- Auto-reply: avoid referencing workspace files in /new greeting prompt. (#5706) Thanks @bravostation.
|
||||
- Tools: treat `"*"` tool allowlist entries as valid to avoid spurious unknown-entry warnings.
|
||||
- Process: resolve Windows `spawn()` failures for npm-family CLIs by appending `.cmd` when needed. (#5815) Thanks @thejhinvirtuoso.
|
||||
- Discord: resolve PluralKit proxied senders for allowlists and labels. (#5838) Thanks @thewilloftheshadow.
|
||||
- Agents: ensure OpenRouter attribution headers apply in the embedded runner.
|
||||
|
||||
@@ -20,6 +20,12 @@ describe("stripPluginOnlyAllowlist", () => {
|
||||
expect(policy.unknownAllowlist).toEqual([]);
|
||||
});
|
||||
|
||||
it('keeps allowlist when it uses "*"', () => {
|
||||
const policy = stripPluginOnlyAllowlist({ allow: ["*"] }, pluginGroups, coreTools);
|
||||
expect(policy.policy?.allow).toEqual(["*"]);
|
||||
expect(policy.unknownAllowlist).toEqual([]);
|
||||
});
|
||||
|
||||
it("keeps allowlist when it mixes plugin and core entries", () => {
|
||||
const policy = stripPluginOnlyAllowlist(
|
||||
{ allow: ["lobster", "read"] },
|
||||
|
||||
@@ -215,6 +215,10 @@ export function stripPluginOnlyAllowlist(
|
||||
const unknownAllowlist: string[] = [];
|
||||
let hasCoreEntry = false;
|
||||
for (const entry of normalized) {
|
||||
if (entry === "*") {
|
||||
hasCoreEntry = true;
|
||||
continue;
|
||||
}
|
||||
const isPluginEntry =
|
||||
entry === "group:plugins" || pluginIds.has(entry) || pluginTools.has(entry);
|
||||
const expanded = expandToolGroups([entry]);
|
||||
|
||||
Reference in New Issue
Block a user