mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-10-13 10:36:35 +00:00
fix: address Codacy findings on the core audit PR
- plugin_manager.prepare_plugin_config: when the fallback legacy-boolean
pass also fails, log a warning instead of a bare except/pass.
- api_client.js: request() refuses any endpoint that is not a plain path
under /api/v3 ("//host", backslashes, ".." or "." segments, whitespace,
control characters) with INVALID_ENDPOINT before calling fetch(), and
plugin ids are URL-encoded wherever they are put into a URL (also in the
app-shell batch load).
- test_update_all.js: pins both against the shipped client.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -838,8 +838,8 @@
|
||||
// PluginAPI.batch returns already-parsed JSON objects
|
||||
try {
|
||||
const results = await window.PluginAPI.batch([
|
||||
{endpoint: `/plugins/config?plugin_id=${pluginId}`, method: 'GET'},
|
||||
{endpoint: `/plugins/schema?plugin_id=${pluginId}`, method: 'GET'},
|
||||
{endpoint: `/plugins/config?plugin_id=${encodeURIComponent(pluginId)}`, method: 'GET'},
|
||||
{endpoint: `/plugins/schema?plugin_id=${encodeURIComponent(pluginId)}`, method: 'GET'},
|
||||
{endpoint: '/plugins/installed', method: 'GET'}
|
||||
]);
|
||||
[configData, schemaData, pluginsData] = results;
|
||||
|
||||
Reference in New Issue
Block a user