From 3a65f2e45bfab15f13a055ddb7feab30d1cfd2ca Mon Sep 17 00:00:00 2001 From: juanmanuelr Date: Wed, 18 Sep 2013 13:39:29 +0000 Subject: [PATCH] 2013-09-18 Juan Manuel Ramon * include/functions_modules.php: Module name checking for invalid characters added at creation time. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8780 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ pandora_console/include/functions_modules.php | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 3f93815a4b..eec75bfe85 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2013-09-18 Juan Manuel Ramon + + * include/functions_modules.php: Module name checking + for invalid characters added at creation time. + 2013-09-16 Vanessa Gil * include/languages/ar.mo diff --git a/pandora_console/include/functions_modules.php b/pandora_console/include/functions_modules.php index 407ebaa70d..273c80edf8 100644 --- a/pandora_console/include/functions_modules.php +++ b/pandora_console/include/functions_modules.php @@ -400,6 +400,11 @@ function modules_create_agent_module ($id_agent, $name, $values = false, $disabl if (empty ($name)) { return ERR_INCOMPLETE; } + + // Check for non valid characters in module name + if (strpbrk(io_safe_output($name), '¡¿÷ºª') !== false) { + return ERR_GENERIC; + } if (! is_array ($values)) $values = array ();