Fix agent name input to allow '-'
Former-commit-id: 8b69d89daa3baeca5126c88c53dbe8323860f95d
This commit is contained in:
parent
2d26a74f9e
commit
343c6a6edf
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue