fix: validate module names to disallow unallowed characters (#12025)
This commit is contained in:
1 parent
e998366aba
commit
2f7eb0ee03
5 files changed
+91
No files matched your search
@@ -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")
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user