fix(config): preserve empty plugin allowlist (#87883) · openclaw/openclaw@b3c7ef6
zhangguiping
·
2026-05-29
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1041,7 +1041,8 @@ export function materializePluginAutoEnableCandidatesInternal(params: {
|
1041 | 1041 | } |
1042 | 1042 | |
1043 | 1043 | const allow = next.plugins?.allow; |
1044 | | -const allowMissing = Array.isArray(allow) && !allow.includes(entry.pluginId); |
| 1044 | +const hasRestrictiveAllowlist = Array.isArray(allow) && allow.length > 0; |
| 1045 | +const allowMissing = hasRestrictiveAllowlist && !allow.includes(entry.pluginId); |
1045 | 1046 | const alreadyEnabled = |
1046 | 1047 | builtInChannelId != null |
1047 | 1048 | ? isBuiltInChannelAlreadyEnabled(next, builtInChannelId) |
@@ -1051,7 +1052,9 @@ export function materializePluginAutoEnableCandidatesInternal(params: {
|
1051 | 1052 | } |
1052 | 1053 | |
1053 | 1054 | next = registerPluginEntry(next, entry, params.manifestRegistry); |
1054 | | -next = ensurePluginAllowlisted(next, entry.pluginId); |
| 1055 | +if (hasRestrictiveAllowlist) { |
| 1056 | +next = ensurePluginAllowlisted(next, entry.pluginId); |
| 1057 | +} |
1055 | 1058 | const reason = resolvePluginAutoEnableCandidateReason(entry); |
1056 | 1059 | autoEnabledReasons.set(entry.pluginId, [ |
1057 | 1060 | ...(autoEnabledReasons.get(entry.pluginId) ?? []), |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。