diff options
author | Phil Davis <phil.davis@inf.org> | 2014-03-06 20:28:21 -0800 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2014-03-06 20:28:21 -0800 |
commit | fd8398420ddad40343a6b96273467e72943d7674 (patch) | |
tree | 98bb072836197f4b57b2aac732ad7b98b2f7d168 /usr | |
parent | bd9d6e0e354b6f753ac8f08b96598c5f203bf858 (diff) | |
download | pfsense-fd8398420ddad40343a6b96273467e72943d7674.zip pfsense-fd8398420ddad40343a6b96273467e72943d7674.tar.gz |
Refine check for existence of rule advanced options
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/firewall_rules_edit.php | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php index 7bbd8e9..dfad088 100755 --- a/usr/local/www/firewall_rules_edit.php +++ b/usr/local/www/firewall_rules_edit.php @@ -46,17 +46,18 @@ require_once("filter.inc"); require("shaper.inc"); function is_aoadv_used($rule_config) { - if (($rule_config['allowopts']) || - ($rule_config['disablereplyto']) || + // Note that the user could set "tag" or "tagged" to the string "0", which is valid but empty(). + if ((isset($rule_config['allowopts'])) || + (isset($rule_config['disablereplyto'])) || ($rule_config['tag'] != "") || ($rule_config['tagged'] != "") || - ($rule_config['max'] != "") || - ($rule_config['max-src-nodes'] != "") || - ($rule_config['max-src-conn'] != "") || - ($rule_config['max-src-states'] != "") || - ($rule_config['max-src-conn-rate'] != "") || - ($rule_config['max-src-conn-rates'] != "") || - ($rule_config['statetimeout'] != "")) + (!empty($rule_config['max'])) || + (!empty($rule_config['max-src-nodes'])) || + (!empty($rule_config['max-src-conn'])) || + (!empty($rule_config['max-src-states'])) || + (!empty($rule_config['max-src-conn-rate'])) || + (!empty($rule_config['max-src-conn-rates'])) || + (!empty($rule_config['statetimeout']))) return true; return false; } |