Fix plugin loading when browser sends unrecognised lang

This commit is contained in:
Nick O'Leary
2021-05-11 16:42:00 +01:00
parent ade318bb78
commit d8d384a979
2 changed files with 5 additions and 7 deletions

View File

@@ -58,7 +58,7 @@ var api = module.exports = {
* @memberof @node-red/runtime_plugins
*/
getPluginConfigs: async function(opts) {
if (/[^a-z\-]/i.test(opts.lang)) {
if (/[^0-9a-z=\-\*]/i.test(opts.lang)) {
throw new Error("Invalid language: "+opts.lang)
return;
}