Project

General

Profile

Bug #1765

Unable able to clear Snort Alerts

Added by Cino . about 8 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Snort
Target version:
-
Start date:
08/09/2011
Due date:
% Done:

100%

Estimated time:
Affected Version:
Affected Architecture:

Description

Unable to clear the Snort Alert log. After clicking on Clear and Ok, you are brought to a blank page. Going back to the alert page, the alerts are still there.

History

#1 Updated by Ermal Luçi about 8 years ago

  • Project changed from pfSense to pfSense Packages
  • Category deleted (Package System)

#2 Updated by Ermal Luçi about 8 years ago

  • Category set to Snort

#3 Updated by Ermal Luçi almost 8 years ago

  • Status changed from New to Feedback

This should be fixed since long now

#4 Updated by Cino . almost 8 years ago

I uninstalled and reinstall the snort package. Its still not clearing the log. I dont get a blank page anymore. Just refreshes the page when i click clear

#5 Updated by Leon Topliss almost 8 years ago

Hello, my first post here so hope its helpful. Not seeing the fix when i uninstall and reinstall. The Clear button seems to be getting with the variable name action and value clear, rather than the variable being clear. Also there seems to be an s missing from file_put_contents.
Both of the following options fixed this for me, Not sure which is the best option although I think option 1 looks more in keeping with the rest of the code.

OPTION 1
--------

88c88,89
< if ($_GET['clear'])
---

if ($_POST['clear'])

93c94
< @file_put_content("/var/log/snort/alert", "");
---

@file_put_contents("/var/log/snort/alert", "");

306c307
< log files will be saved. <a href="/snort/snort_alerts.php?action=clear"><input name="delete" type="button"
---

log files will be saved. <input name="clear" type="submit"

308c309
< onclick="return confirm('Do you really want to remove all your logs ? All snort rule interfces may have to be restarted.')"></a>
---

onclick="return confirm('Do you really want to remove all your logs ? All snort rule interfces may have to be restarted.')">

OR OPTION 2
-----------

88c88
< if ($_GET['clear'])
---

if ($_GET['action'] == 'clear')

93c93
< @file_put_content("/var/log/snort/alert", "");
---

@file_put_contents("/var/log/snort/alert", "");

#6 Updated by Cino . almost 8 years ago

I've confirmed that option 1 works on my box also.. Thanks Leon Topliss

#7 Updated by Ermal Luçi almost 8 years ago

  • % Done changed from 0 to 100

Applied in changeset commit:b4542701c3f275b74a309f0db7682086b6d7b461.

#8 Updated by Cino . over 7 years ago

this has been resolved. you can close out this ticket

#9 Updated by Ermal Luçi over 7 years ago

  • Status changed from Feedback to Resolved

Thanks Cino.

Also available in: Atom PDF