mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 09:15:15 +02:00
Merge branch 'ent-8751_espacios_no_mostrados_creando_agentes_en_API' into 'develop'
Fix x20; chars in alias when create agents with alias with spaces in API See merge request artica/pandorafms!4804
This commit is contained in:
commit
a7791c06fc
@ -1855,7 +1855,19 @@ function api_set_new_agent($thrash1, $thrash2, $other, $thrash3)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$alias = io_safe_input(trim(preg_replace('/[\/\\\|%#&$]/', '', $other['data'][0])));
|
$alias = io_safe_input(
|
||||||
|
trim(
|
||||||
|
preg_replace(
|
||||||
|
'/[\/\\\|%#&$]/',
|
||||||
|
'',
|
||||||
|
preg_replace(
|
||||||
|
'/x20;/',
|
||||||
|
' ',
|
||||||
|
$other['data'][0]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
$direccion_agente = io_safe_input($other['data'][1]);
|
$direccion_agente = io_safe_input($other['data'][1]);
|
||||||
$nombre_agente = hash('sha256', $direccion_agente.'|'.$direccion_agente.'|'.time().'|'.sprintf('%04d', rand(0, 10000)));
|
$nombre_agente = hash('sha256', $direccion_agente.'|'.$direccion_agente.'|'.time().'|'.sprintf('%04d', rand(0, 10000)));
|
||||||
$id_parent = (int) $other['data'][2];
|
$id_parent = (int) $other['data'][2];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user