diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 9b66c77eb1..5b28a14dae 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,13 @@ +2012-12-12 Hirofumi Kosaka + + * godmode/agentes/module_manager_editor.php: Fixed a bug only + for the Enterprise version. When 'Remote Configuration' is + enabled and you try to create new module, which name includes + meta characters, you will get the error "The field name and + name in module_name in data configuration are different." + + Merged from branch 4.x. + 2012-12-11 Juan Manuel Ramon * include/ajax/agent.php diff --git a/pandora_console/godmode/agentes/module_manager_editor.php b/pandora_console/godmode/agentes/module_manager_editor.php index 2002006448..bb18fb6e16 100644 --- a/pandora_console/godmode/agentes/module_manager_editor.php +++ b/pandora_console/godmode/agentes/module_manager_editor.php @@ -470,11 +470,11 @@ $(document).ready (function () { //Check the name name = $("#text-name").val(); remote_config = $("#textarea_configuration_data").val(); - - regexp_name = new RegExp('module_name\\s*' + name+"\n"); - + + regexp_name = new RegExp('module_name\\s*' + name.replace(/([^0-9A-Za-z_])/g, "\\$1") +"\n"); + regexp_plugin = new RegExp('^module_plugin\\s*'); - + if (remote_config == '' || remote_config.match(regexp_name) || remote_config.match(regexp_plugin) || $("#id_module_type").val()==100 ||