diff options
Diffstat (limited to 'config/snort')
-rw-r--r-- | config/snort/snort_alerts.widget.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/config/snort/snort_alerts.widget.php b/config/snort/snort_alerts.widget.php index 96c70562..2b7a10c7 100644 --- a/config/snort/snort_alerts.widget.php +++ b/config/snort/snort_alerts.widget.php @@ -125,7 +125,10 @@ function snort_widget_get_alerts() { /* 0 1 2 3 4 5 6 7 8 9 10 11 12 */ /* File format: timestamp,generator_id,sig_id,sig_rev,msg,proto,src,srcport,dst,dstport,id,classification,priority */ - $fd = fopen("/tmp/alert_snort{$snort_uuid}", "r"); + if (!$fd = fopen("/tmp/alert_snort{$snort_uuid}", "r")) { + log_error(gettext("[Snort Widget] Failed to open file /tmp/alert_snort{$snort_uuid}")); + continue; + } while (($fields = fgetcsv($fd, 1000, ',', '"')) !== FALSE) { if(count($fields) < 13) continue; |