Project

General

Profile

Actions

Bug #1765

closed

Unable able to clear Snort Alerts

Added by Cino . over 12 years ago. Updated about 12 years ago.

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

100%

Estimated time:
Plus Target Version:
Affected Version:
Affected Plus 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.

Actions #1

Updated by Ermal Luçi over 12 years ago

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

Updated by Ermal Luçi over 12 years ago

  • Category set to Snort
Actions #3

Updated by Ermal Luçi over 12 years ago

  • Status changed from New to Feedback

This should be fixed since long now

Actions #4

Updated by Cino . over 12 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

Actions #5

Updated by Leon Topliss over 12 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", "");

Actions #6

Updated by Cino . over 12 years ago

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

Actions #7

Updated by Ermal Luçi over 12 years ago

  • % Done changed from 0 to 100

Applied in changeset commit:b4542701c3f275b74a309f0db7682086b6d7b461.

Actions #8

Updated by Cino . about 12 years ago

this has been resolved. you can close out this ticket

Actions #9

Updated by Ermal Luçi about 12 years ago

  • Status changed from Feedback to Resolved

Thanks Cino.

Actions

Also available in: Atom PDF