fix: validate module names to disallow unallowed characters (#12025)

This commit is contained in:
Harminder Virk authored and GitHub committed 2025-03-28 22:39:39 +05:30
1 parent e998366aba
commit 2f7eb0ee03
5 files changed
+91

No files matched your search

+5
View File
@@ -19,6 +19,7 @@ import {
GraphQLSchema,
mergePluginModules,
promiseAll,
validateModuleName,
} from "@medusajs/framework/utils"
import { WorkflowLoader } from "@medusajs/framework/workflows"
import { asValue } from "awilix"
@@ -150,6 +151,10 @@ export default async ({
const plugins = await getResolvedPlugins(rootDirectory, configModule, true)
mergePluginModules(configModule, plugins)
Object.keys(configModule.modules ?? {}).forEach((key) => {
validateModuleName(key)
})
const linksSourcePaths = plugins.map((plugin) =>
join(plugin.resolve, "links")
)