From 343c6a6edf8e9b5c879042e074934479f4e31c44 Mon Sep 17 00:00:00 2001 From: Luis Calvo Date: Mon, 1 Apr 2019 15:18:56 +0200 Subject: [PATCH] Fix agent name input to allow '-' Former-commit-id: 8b69d89daa3baeca5126c88c53dbe8323860f95d --- pandora_console/godmode/agentes/configurar_agente.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 9c10099042..74a5c3dc9f 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -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);