mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Disallow store names that are not A-Za-z0-9_
This commit is contained in:
@@ -56,6 +56,9 @@ function load() {
|
||||
if (pluginName === "_") {
|
||||
continue;
|
||||
}
|
||||
if (!/^[a-zA-Z0-9_]+$/.test(pluginName)) {
|
||||
return reject(new Error(log._("context.error-invalid-module-name", {name:pluginName})));
|
||||
}
|
||||
|
||||
// Check if this is setting the 'default' context to be a named plugin
|
||||
if (pluginName === "default" && typeof plugins[pluginName] === "string") {
|
||||
|
Reference in New Issue
Block a user