Merge branch 'ent-4658-cross-site-seguridad-base64' into 'develop'

Changed the mode of obtain the title

See merge request artica/pandorafms!2743
This commit is contained in:
Daniel Rodriguez 2020-01-09 16:46:58 +01:00
commit 1cef8aa62f
7 changed files with 8 additions and 26 deletions

View File

@ -798,11 +798,7 @@ function mainAgentsModules()
echo "<td style='text-align: center;'>";
$win_handle = dechex(crc32($module_id.$module['name']));
$graph_type = return_graphtype(modules_get_agentmodule_type($module_id));
$link = "winopeng('".'operation/agentes/stat_win.php?'."type=$graph_type&".'period='.SECONDS_1DAY.'&'.'id='.$module_id.'&'.'label='.rawurlencode(
urlencode(
base64_encode($module['name'])
)
).'&'.'refresh='.SECONDS_10MINUTES."', 'day_".$win_handle."')";
$link = "winopeng('".'operation/agentes/stat_win.php?'."type=$graph_type&".'period='.SECONDS_1DAY.'&'.'id='.$module_id.'&'.'refresh='.SECONDS_10MINUTES."', 'day_".$win_handle."')";
echo '<a href="javascript:'.$link.'">';
switch ($status) {

View File

@ -1141,11 +1141,7 @@ if (check_login()) {
$draw_events = 0;
}
$link = "winopeng_var('".'operation/agentes/stat_win.php?'."type=$graph_type&amp;".'period='.SECONDS_1DAY.'&amp;id='.$module['id_agente_modulo'].'&amp;label='.rawurlencode(
urlencode(
base64_encode($module['nombre'])
)
).'&amp;refresh='.SECONDS_10MINUTES.'&amp;'."draw_events=$draw_events', 'day_".$win_handle."', 1000, 700)";
$link = "winopeng_var('".'operation/agentes/stat_win.php?'."type=$graph_type&amp;".'period='.SECONDS_1DAY.'&amp;id='.$module['id_agente_modulo'].'&amp;refresh='.SECONDS_10MINUTES.'&amp;'."draw_events=$draw_events', 'day_".$win_handle."', 1000, 700)";
if (!is_snapshot_data($module['datos'])) {
$data[8] .= '<a href="javascript:'.$link.'">'.html_print_image('images/chart_curve.png', true, ['border' => '0', 'alt' => '']).'</a> &nbsp;&nbsp;';
}

View File

@ -652,7 +652,6 @@ class Tree
'type' => $graphType,
'period' => SECONDS_1DAY,
'id' => $module['id'],
'label' => base64_encode($module['name']),
'refresh' => SECONDS_10MINUTES,
];

View File

@ -4116,7 +4116,6 @@ function events_page_details($event, $server='')
'type' => $graph_type,
'period' => SECONDS_1DAY,
'id' => $module['id_agente_modulo'],
'label' => base64_encode($module['nombre']),
'refresh' => SECONDS_10MINUTES,
];

View File

@ -49,11 +49,10 @@ if (file_exists('../../include/languages/'.$user_language.'.mo')) {
echo '<link rel="stylesheet" href="../../include/styles/pandora.css" type="text/css"/>';
$label = get_parameter('label');
$label = base64_decode($label);
$id = get_parameter('id');
$id_agent = db_get_value('id_agente', 'tagente_modulo', 'id_agente_modulo', $id);
$alias = db_get_value('alias', 'tagente', 'id_agente', $id_agent);
$id = get_parameter('id');
$id_agent = db_get_value('id_agente', 'tagente_modulo', 'id_agente_modulo', $id);
$alias = db_get_value('alias', 'tagente', 'id_agente', $id_agent);
$label = db_get_value('nombre', 'tagente_modulo', 'id_agente_modulo', $id);
// $agent = agents_get_agent_with_ip ("192.168.50.31");
// $label = rawurldecode(urldecode(base64_decode(get_parameter('label', ''))));
?>
@ -117,8 +116,6 @@ $alias = db_get_value('alias', 'tagente', 'id_agente', $id_agent);
$period = get_parameter('period');
$id = get_parameter('id', 0);
$label = get_parameter('label', '');
$label_graph = base64_decode(get_parameter('label', ''));
$start_date = get_parameter('start_date', date('Y/m/d'));
$start_time = get_parameter('start_time', date('H:i:s'));
$draw_events = get_parameter('draw_events', 0);
@ -190,7 +187,7 @@ $alias = db_get_value('alias', 'tagente', 'id_agente', $id_agent);
'agent_module_id' => $id,
'period' => $period,
'show_events' => $draw_events,
'title' => $label_graph,
'title' => $label,
'unit_name' => $unit,
'show_alerts' => $draw_alerts,
'date' => $date,

View File

@ -1502,7 +1502,6 @@ if (!empty($result)) {
'type' => $graph_type,
'period' => SECONDS_1DAY,
'id' => $row['id_agente_modulo'],
'label' => base64_encode($row['module_name']),
'refresh' => SECONDS_10MINUTES,
];

View File

@ -152,11 +152,7 @@ if (!$modules || !$searchModules) {
$url = 'include/procesos.php?agente='.$module['id_agente_modulo'];
$win_handle = dechex(crc32($module['id_agente_modulo'].$module['module_name']));
$link = "winopeng('".'operation/agentes/stat_win.php?'."type=$graph_type&".'period='.SECONDS_1DAY.'&'.'id='.$module['id_agente_modulo'].'&'.'label='.rawurlencode(
urlencode(
base64_encode($module['module_name'])
)
).'&'.'refresh='.SECONDS_10MINUTES."', "."'day_".$win_handle."')";
$link = "winopeng('".'operation/agentes/stat_win.php?'."type=$graph_type&".'period='.SECONDS_1DAY.'&'.'id='.$module['id_agente_modulo'].'&'.'refresh='.SECONDS_10MINUTES."', "."'day_".$win_handle."')";
$graphCell = '<a href="javascript:'.$link.'">'.html_print_image('images/chart_curve.png', true, ['border' => 0, 'alt' => '']).'</a>';
$graphCell .= '&nbsp;'."<a href='index.php?".'sec=estado&amp;'.'sec2=operation/agentes/ver_agente&amp;'.'id_agente='.$module['id_agente'].'&amp;'.'tab=data_view&'.'period='.SECONDS_1DAY.'&amp;'.'id='.$module['id_agente_modulo']."'>".html_print_image(