aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-06-20 15:41:50 -0300
committerRenato Botelho <garga@FreeBSD.org>2014-06-20 15:41:50 -0300
commitf72a1e651131846ca6494c78006a6c97267a6985 (patch)
treeda9fd3a13f080312c612498947f7a1ab3e6d34ae
parenta72404116dd45d1bd4d4ee738475d069c9a5e58a (diff)
downloadpfsense-packages-f72a1e651131846ca6494c78006a6c97267a6985.tar.gz
pfsense-packages-f72a1e651131846ca6494c78006a6c97267a6985.tar.bz2
pfsense-packages-f72a1e651131846ca6494c78006a6c97267a6985.zip
Fix call-time pass by reference for snort package
-rw-r--r--config/snort/snort_interfaces_suppress_edit.php7
-rw-r--r--config/snort/snort_passlist_edit.php7
2 files changed, 12 insertions, 2 deletions
diff --git a/config/snort/snort_interfaces_suppress_edit.php b/config/snort/snort_interfaces_suppress_edit.php
index 986bfc38..ec4d9116 100644
--- a/config/snort/snort_interfaces_suppress_edit.php
+++ b/config/snort/snort_interfaces_suppress_edit.php
@@ -90,7 +90,12 @@ if ($_POST['save']) {
$reqdfields = explode(" ", "name");
$reqdfieldsn = array("Name");
- do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
+
+ $pf_version=substr(trim(file_get_contents("/etc/version")),0,3);
+ if ($pf_version < 2.1)
+ $input_errors = eval('do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); return $input_errors;');
+ else
+ do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
if(strtolower($_POST['name']) == "defaultwhitelist")
$input_errors[] = "Whitelist file names may not be named defaultwhitelist.";
diff --git a/config/snort/snort_passlist_edit.php b/config/snort/snort_passlist_edit.php
index 3be776f4..f501e0fc 100644
--- a/config/snort/snort_passlist_edit.php
+++ b/config/snort/snort_passlist_edit.php
@@ -112,7 +112,12 @@ if ($_POST['save']) {
/* input validation */
$reqdfields = explode(" ", "name");
$reqdfieldsn = explode(",", "Name");
- do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
+
+ $pf_version=substr(trim(file_get_contents("/etc/version")),0,3);
+ if ($pf_version < 2.1)
+ $input_errors = eval('do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); return $input_errors;');
+ else
+ do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
if(strtolower($_POST['name']) == "defaultpasslist")
$input_errors[] = gettext("Pass List file names may not be named defaultpasslist.");