Fix agent name input to allow '-'

Former-commit-id: 8b69d89daa3baeca5126c88c53dbe8323860f95d
This commit is contained in:
Luis Calvo 2019-04-01 15:18:56 +02:00
parent 2d26a74f9e
commit 343c6a6edf
1 changed files with 2 additions and 2 deletions

View File

@ -160,7 +160,7 @@ $module_macros = [];
if ($create_agent) {
$mssg_warning = 0;
$alias_safe_output = io_safe_output(get_parameter('alias', ''));
$alias = io_safe_input(trim(preg_replace('/[\/\\\|%#&$-]/', '', $alias_safe_output)));
$alias = io_safe_input(trim(preg_replace('/[\/\\\|%#&$]/', '', $alias_safe_output)));
$alias_as_name = (int) get_parameter_post('alias_as_name', 0);
$direccion_agente = (string) get_parameter_post('direccion', '');
$unique_ip = (int) get_parameter_post('unique_ip', 0);
@ -766,7 +766,7 @@ if ($update_agent) {
$id_agente = (int) get_parameter_post('id_agente');
$nombre_agente = str_replace('`', '‘', (string) get_parameter_post('agente', ''));
$alias_safe_output = io_safe_output(get_parameter('alias', ''));
$alias = io_safe_input(trim(preg_replace('/[\/\\\|%#&$-]/', '', $alias_safe_output)));
$alias = io_safe_input(trim(preg_replace('/[\/\\\|%#&$]/', '', $alias_safe_output)));
$alias_as_name = (int) get_parameter_post('alias_as_name', 0);
$direccion_agente = (string) get_parameter_post('direccion', '');
$unique_ip = (int) get_parameter_post('unique_ip', 0);