summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2010-10-11 15:16:41 -0400
committerjim-p <jimp@pfsense.org>2010-10-11 15:16:41 -0400
commitf3704cb23f2cfd523499e4765bb8a020cf2c7b9b (patch)
tree166ce52594c2316f2fd5cc4d818a9ccc14ff6876 /etc/inc
parent0a7c9c8e77ad3a37c875d0acc5b2cab382f77b31 (diff)
downloadpfsense-f3704cb23f2cfd523499e4765bb8a020cf2c7b9b.zip
pfsense-f3704cb23f2cfd523499e4765bb8a020cf2c7b9b.tar.gz
Bail out here if a variable isn't an array like it should be.
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/easyrule.inc2
1 files changed, 2 insertions, 0 deletions
diff --git a/etc/inc/easyrule.inc b/etc/inc/easyrule.inc
index c23cf6c..af3f270 100644
--- a/etc/inc/easyrule.inc
+++ b/etc/inc/easyrule.inc
@@ -80,6 +80,8 @@ function easyrule_block_rule_exists($int = 'wan') {
/* Search through the rules for one referencing our alias */
foreach ($config['filter']['rule'] as $rule)
+ if (!is_array($rule) || !is_array($rule['source']))
+ continue;
if ($rule['source']['address'] == $blockaliasname . strtoupper($int) && ($rule['interface'] == $int))
return true;
return false;
OpenPOWER on IntegriCloud