Fix /api/plugins leaking filesystem paths

Replace PluginWebApi's requirePath member with npmPackage which is only
populated if the package is not marked as private and the requirePath
matches the name. This prevents the public /api/plugins endpoint from
leaking filesystem paths into the controller.
This commit is contained in:
Hornwitser committed 2023-12-02 01:43:28 +01:00
1 parent 42ae4d6897
commit 90a88f7e01
7 files changed
+19 -8

No files matched your search

+1 -1
View File
@@ -113,7 +113,7 @@ export default class Controller {
constructor(
clusterLogger: winston.Logger,
pluginInfos: any[],
pluginInfos: lib.PluginNodeEnvInfo[],
configPath: string,
config: lib.ControllerConfig,