mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-09-25 19:09:08 +02:00
Merge branch 'ent-2105-internal-audit-view-improvements' into 'develop'
Más corrección de errores See merge request artica/pandorafms!1492
This commit is contained in:
commit
dcf6e46f61
@ -284,8 +284,9 @@ if ($create_agent) {
|
|||||||
"Url description":"' . $url_description .'",
|
"Url description":"' . $url_description .'",
|
||||||
"Quiet":"' . (int)$quiet.'"}';
|
"Quiet":"' . (int)$quiet.'"}';
|
||||||
|
|
||||||
|
$unsafe_alias = io_safe_output($alias);
|
||||||
db_pandora_audit("Agent management",
|
db_pandora_audit("Agent management",
|
||||||
"Created agent $alias", false, true, $info);
|
"Created agent $unsafe_alias", false, true, $info);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$id_agente = 0;
|
$id_agente = 0;
|
||||||
|
@ -90,14 +90,17 @@ if ($create_alert) {
|
|||||||
"tagente_modulo","id_agente_modulo", $id_agent_module));
|
"tagente_modulo","id_agente_modulo", $id_agent_module));
|
||||||
|
|
||||||
// Audit the creation only when the alert creation is correct
|
// Audit the creation only when the alert creation is correct
|
||||||
|
$unsafe_alert_template_name = io_safe_output($alert_template_name);
|
||||||
|
$unsafe_module_name = io_safe_output($module_name);
|
||||||
|
$unsafe_agent_alias = io_safe_output($agent_alias);
|
||||||
if ($id) {
|
if ($id) {
|
||||||
db_pandora_audit("Alert management",
|
db_pandora_audit("Alert management",
|
||||||
"Added alert '$alert_template_name' for module '$module_name' in agent '$agent_alias'",
|
"Added alert '$unsafe_alert_template_name' for module '$unsafe_module_name' in agent '$unsafe_agent_alias'",
|
||||||
false, false, 'ID: ' . $id);
|
false, false, 'ID: ' . $id);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
db_pandora_audit("Alert management",
|
db_pandora_audit("Alert management",
|
||||||
"Fail Added alert '$alert_template_name' for module '$module_name' in agent '$agent_alias'");
|
"Fail Added alert '$unsafe_alert_template_name' for module '$unsafe_module_name' in agent '$unsafe_agent_alias'");
|
||||||
}
|
}
|
||||||
|
|
||||||
$messageAction = ui_print_result_message ($id,
|
$messageAction = ui_print_result_message ($id,
|
||||||
|
@ -2368,7 +2368,7 @@ function print_audit_csv ($data) {
|
|||||||
echo __('User') . ';' .
|
echo __('User') . ';' .
|
||||||
__('Action') . ';' .
|
__('Action') . ';' .
|
||||||
__('Date') . ';' .
|
__('Date') . ';' .
|
||||||
__('Source ID') . ';' .
|
__('Source IP') . ';' .
|
||||||
__('Comments') ."\n";
|
__('Comments') ."\n";
|
||||||
foreach ($data as $line) {
|
foreach ($data as $line) {
|
||||||
echo io_safe_output($line['id_usuario']) . ';' . io_safe_output($line['accion']) . ';' . $line['fecha'] . ';' . $line['ip_origen'] . ';'. io_safe_output($line['descripcion']). "\n";
|
echo io_safe_output($line['id_usuario']) . ';' . io_safe_output($line['accion']) . ';' . $line['fecha'] . ';' . $line['ip_origen'] . ';'. io_safe_output($line['descripcion']). "\n";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user