From b4542701c3f275b74a309f0db7682086b6d7b461 Mon Sep 17 00:00:00 2001 From: Ermal Date: Tue, 1 Nov 2011 16:38:31 +0000 Subject: Fixes #1765. Correctly identify the clear action that comes through POST or GET --- config/snort/snort_alerts.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config/snort') diff --git a/config/snort/snort_alerts.php b/config/snort/snort_alerts.php index 49bb9bff..06b3637a 100644 --- a/config/snort/snort_alerts.php +++ b/config/snort/snort_alerts.php @@ -85,12 +85,12 @@ if ($_POST['save']) } -if ($_GET['clear']) +if ($_GET['action'] == "clear" || $_POST['clear']) { if(file_exists('/var/log/snort/alert')) { conf_mount_rw(); - @file_put_content("/var/log/snort/alert", ""); + @file_put_contents("/var/log/snort/alert", ""); post_delete_logs(); mwexec('/usr/sbin/chown snort:snort /var/log/snort/*', true); mwexec('/bin/chmod 660 /var/log/snort/*', true); -- cgit v1.2.3