fix(gateway): prevent default built-in plugins from being disabled by explicit allowlists#737
fix(gateway): prevent default built-in plugins from being disabled by explicit allowlists#737
Conversation
… explicit allowlists
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 753dfc892a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const externalPluginIds = allowArr2.filter( | ||
| (pluginId) => !BUILTIN_CHANNEL_IDS.has(pluginId) && !bundled.all.has(pluginId), | ||
| ); |
There was a problem hiding this comment.
Keep user-allowlisted bundled plugins in allowlist
Filtering plugins.allow through !bundled.all.has(pluginId) removes every bundled plugin ID from externalPluginIds, and only enabledByDefault IDs are re-added later, so bundled-but-opt-in plugins (for example, any bundled plugin a user intentionally allowlisted) are silently dropped on sanitize. In configs that also need a non-empty allowlist (e.g., because of third-party plugins), this makes those explicitly enabled bundled plugins impossible to keep enabled across restarts.
Useful? React with 👍 / 👎.
No description provided.