Bug #1765
closedUnable able to clear Snort Alerts
100%
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.
Updated by Ermal Luçi over 12 years ago
- Project changed from pfSense to pfSense Packages
- Category deleted (
Package System)
Updated by Ermal Luçi over 12 years ago
- Status changed from New to Feedback
This should be fixed since long now
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
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", "");
Updated by Cino . over 12 years ago
I've confirmed that option 1 works on my box also.. Thanks Leon Topliss
Updated by Ermal Luçi over 12 years ago
- % Done changed from 0 to 100
Applied in changeset commit:b4542701c3f275b74a309f0db7682086b6d7b461.
Updated by Cino . about 12 years ago
this has been resolved. you can close out this ticket