From f7b2255a6cef27dfb9241184a008047fdfa2d725 Mon Sep 17 00:00:00 2001 From: jsatoh Date: Wed, 27 Nov 2013 04:43:14 +0000 Subject: [PATCH] 2013-11-27 Junichi Satoh * include/functions_modules.php: Fixed that some multibyte characters are recognized as invalid characters on module creation. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9135 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ pandora_console/include/functions_modules.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index e47751c3a2..16c3ad3673 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2013-11-27 Junichi Satoh + + * include/functions_modules.php: Fixed that some multibyte characters + are recognized as invalid characters on module creation. + 2013-11-26 Sergio Martin * mobile/operation/events.php diff --git a/pandora_console/include/functions_modules.php b/pandora_console/include/functions_modules.php index 35972b5e67..d13e21186b 100644 --- a/pandora_console/include/functions_modules.php +++ b/pandora_console/include/functions_modules.php @@ -427,7 +427,7 @@ function modules_create_agent_module ($id_agent, $name, $values = false, $disabl } // Check for non valid characters in module name - if (strpbrk(io_safe_output($name), '¡¿÷ºª') !== false) { + if (mb_ereg_match('[\xc2\xa1\xc2\xbf\xc3\xb7\xc2\xba\xc2\xaa]', io_safe_output($name)) !== false) { return ERR_GENERIC; }