diff options
author | jim-p <jimp@pfsense.org> | 2014-05-09 14:55:40 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2014-05-16 15:46:13 -0400 |
commit | f2a1fd070eaab580768132d27bb41da9946e0a9a (patch) | |
tree | acfc1247618e610de63a3e40b7621602b1f5c0ed | |
parent | 7051ab51a12cc3b94adb987d99a04126dd67b3a7 (diff) | |
download | pfsense-packages-f2a1fd070eaab580768132d27bb41da9946e0a9a.tar.gz pfsense-packages-f2a1fd070eaab580768132d27bb41da9946e0a9a.tar.bz2 pfsense-packages-f2a1fd070eaab580768132d27bb41da9946e0a9a.zip |
Fix call-time pass-by-reference in haproxy-legacy, bump
-rwxr-xr-x | config/haproxy-legacy/haproxy_frontends_edit.php | 11 | ||||
-rwxr-xr-x | config/haproxy-legacy/haproxy_global.php | 6 | ||||
-rwxr-xr-x | config/haproxy-legacy/haproxy_servers_edit.php | 6 | ||||
-rw-r--r-- | pkg_config.10.xml | 2 | ||||
-rw-r--r-- | pkg_config.8.xml | 2 | ||||
-rw-r--r-- | pkg_config.8.xml.amd64 | 2 |
6 files changed, 22 insertions, 7 deletions
diff --git a/config/haproxy-legacy/haproxy_frontends_edit.php b/config/haproxy-legacy/haproxy_frontends_edit.php index db1c71be..b32cb762 100755 --- a/config/haproxy-legacy/haproxy_frontends_edit.php +++ b/config/haproxy-legacy/haproxy_frontends_edit.php @@ -96,12 +96,19 @@ if ($_POST) { $reqdfieldsn = explode(",", "Name,Connection timeout,Server timeout"); } - 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); $reqdfields = explode(" ", "name type port max_connections client_timeout"); $reqdfieldsn = explode(",", "Name,Type,Port,Max connections,Client timeout"); - do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); + 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 (preg_match("/[^a-zA-Z0-9\.\-_]/", $_POST['name'])) $input_errors[] = "The field 'Name' contains invalid characters."; diff --git a/config/haproxy-legacy/haproxy_global.php b/config/haproxy-legacy/haproxy_global.php index 509fdfe2..4ea03c75 100755 --- a/config/haproxy-legacy/haproxy_global.php +++ b/config/haproxy-legacy/haproxy_global.php @@ -57,7 +57,11 @@ if ($_POST) { $reqdfieldsn = explode(",", "Maximum connections"); } - 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 ($_POST['maxconn'] && (!is_numeric($_POST['maxconn']))) $input_errors[] = "The maximum number of connections should be numeric."; diff --git a/config/haproxy-legacy/haproxy_servers_edit.php b/config/haproxy-legacy/haproxy_servers_edit.php index 86431992..843ecca5 100755 --- a/config/haproxy-legacy/haproxy_servers_edit.php +++ b/config/haproxy-legacy/haproxy_servers_edit.php @@ -70,7 +70,11 @@ if ($_POST) { $reqdfields = explode(" ", "name address weight"); $reqdfieldsn = explode(",", "Name,Address,Weight"); - 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 (preg_match("/[^a-zA-Z0-9\.\-_]/", $_POST['name'])) $input_errors[] = "The field 'Name' contains invalid characters."; diff --git a/pkg_config.10.xml b/pkg_config.10.xml index 1cf3d329..3753084f 100644 --- a/pkg_config.10.xml +++ b/pkg_config.10.xml @@ -172,7 +172,7 @@ (Legacy version)]]></descr> <website>http://haproxy.1wt.eu/</website> <category>Services</category> - <version>1.4.24_1 pkg v 1.1</version> + <version>1.4.24_1 pkg v 1.1.1</version> <status>Release</status> <required_version>2.2</required_version> <config_file>https://packages.pfsense.org/packages/config/haproxy-legacy/haproxy.xml</config_file> diff --git a/pkg_config.8.xml b/pkg_config.8.xml index 172866ae..3c47fbf3 100644 --- a/pkg_config.8.xml +++ b/pkg_config.8.xml @@ -175,7 +175,7 @@ (Legacy version)]]></descr> <website>http://haproxy.1wt.eu/</website> <category>Services</category> - <version>1.4.24 pkg v 1.1</version> + <version>1.4.24 pkg v 1.1.1</version> <status>Release</status> <required_version>2.0</required_version> <config_file>https://packages.pfsense.org/packages/config/haproxy-legacy/haproxy.xml</config_file> diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64 index 9dd5f799..be45ce58 100644 --- a/pkg_config.8.xml.amd64 +++ b/pkg_config.8.xml.amd64 @@ -162,7 +162,7 @@ (Legacy version)]]></descr> <website>http://haproxy.1wt.eu/</website> <category>Services</category> - <version>1.4.24 pkg v 1.1</version> + <version>1.4.24 pkg v 1.1.1</version> <status>Release</status> <required_version>2.0</required_version> <config_file>https://packages.pfsense.org/packages/config/haproxy-legacy/haproxy.xml</config_file> |