From 5cb08a96dec952ae6e1fd657e6940ea79af4f8d8 Mon Sep 17 00:00:00 2001 From: bmeeks8 Date: Wed, 19 Mar 2014 17:24:00 -0400 Subject: Add new Log Mgmt tab link and improve parameter checking. --- config/suricata/suricata_define_vars.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'config/suricata/suricata_define_vars.php') diff --git a/config/suricata/suricata_define_vars.php b/config/suricata/suricata_define_vars.php index e130e555..22b8ab3c 100644 --- a/config/suricata/suricata_define_vars.php +++ b/config/suricata/suricata_define_vars.php @@ -34,9 +34,10 @@ require_once("/usr/local/pkg/suricata/suricata.inc"); global $g, $rebuild_rules; -$id = $_GET['id']; -if (isset($_POST['id'])) +if (isset($_POST['id']) && is_numericint($_POST['id'])) $id = $_POST['id']; +elseif (isset($_GET['id']) && is_numericint($_GET['id'])) + $id = htmlspecialchars($_GET['id']); if (is_null($id)) { header("Location: /suricata/suricata_interfaces.php"); exit; @@ -163,6 +164,7 @@ if ($savemsg) $tab_array[] = array(gettext("Alerts"), false, "/suricata/suricata_alerts.php?instance={$id}"); $tab_array[] = array(gettext("Suppress"), false, "/suricata/suricata_suppress.php"); $tab_array[] = array(gettext("Logs Browser"), false, "/suricata/suricata_logs_browser.php?instance={$id}"); + $tab_array[] = array(gettext("Logs Mgmt"), false, "/suricata/suricata_logs_mgmt.php"); display_top_tabs($tab_array); echo ''; echo ''; -- cgit v1.2.3