From 333b9beb1c607e3fcf7e9a0e563cdd5aab4f915a Mon Sep 17 00:00:00 2001 From: hkosaka Date: Wed, 12 Dec 2012 03:37:54 +0000 Subject: [PATCH] 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. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7263 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 10 ++++++++++ .../godmode/agentes/module_manager_editor.php | 8 ++++---- 2 files changed, 14 insertions(+), 4 deletions(-) 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 ||