diff options
author | bmeeks8 <bmeeks8@bellsouth.net> | 2015-07-22 18:53:34 -0400 |
---|---|---|
committer | bmeeks8 <bmeeks8@bellsouth.net> | 2015-07-22 18:53:34 -0400 |
commit | e4e3ad354f0175ec6ed8e39c40ff2a5666856a8b (patch) | |
tree | 6c46369dc220fda55b82f176c37d369fb816adb9 /config | |
parent | 5e599141bcf99c01463819532bb9ab88203b0f7e (diff) | |
download | pfsense-packages-e4e3ad354f0175ec6ed8e39c40ff2a5666856a8b.tar.gz pfsense-packages-e4e3ad354f0175ec6ed8e39c40ff2a5666856a8b.tar.bz2 pfsense-packages-e4e3ad354f0175ec6ed8e39c40ff2a5666856a8b.zip |
Verify suricata_widget file handle before trying to use it.
Diffstat (limited to 'config')
-rw-r--r-- | config/suricata/suricata_alerts.widget.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/config/suricata/suricata_alerts.widget.php b/config/suricata/suricata_alerts.widget.php index 81d17c2e..954fef17 100644 --- a/config/suricata/suricata_alerts.widget.php +++ b/config/suricata/suricata_alerts.widget.php @@ -124,7 +124,10 @@ function suricata_widget_get_alerts() { /* 0 1 2 3 4 5 6 7 */ /************** *************************************************************************************************************************/ - $fd = fopen("/tmp/surialerts_{$suricata_uuid}", "r"); + if (!$fd = fopen("/tmp/surialerts_{$suricata_uuid}", "r")) { + log_error(gettext("[Suricata Widget] Failed to open file /tmp/surialerts_{$suricata_uuid}")); + continue; + } $buf = ""; while (($buf = fgets($fd)) !== FALSE) { $fields = array(); |