aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTorben Nielsen <torben@t-hoerup.dk>2013-03-04 20:58:06 +0100
committerTorben Nielsen <torben@t-hoerup.dk>2013-03-04 20:58:06 +0100
commit0e21a5f32bbc00e783881ef748a15c424743e618 (patch)
tree44abe28d9c56e7f62670d7c89d358e0681c9ce82
parentb6f71f6437833f631fd695fcee37b150f453b9d1 (diff)
downloadpfsense-packages-0e21a5f32bbc00e783881ef748a15c424743e618.tar.gz
pfsense-packages-0e21a5f32bbc00e783881ef748a15c424743e618.tar.bz2
pfsense-packages-0e21a5f32bbc00e783881ef748a15c424743e618.zip
isnumeric(weight) is enough to check valid server weight
-rw-r--r--config/haproxy-devel/haproxy_pool_edit.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/config/haproxy-devel/haproxy_pool_edit.php b/config/haproxy-devel/haproxy_pool_edit.php
index 5724e6e3..b8cb5db6 100644
--- a/config/haproxy-devel/haproxy_pool_edit.php
+++ b/config/haproxy-devel/haproxy_pool_edit.php
@@ -136,11 +136,10 @@ if ($_POST) {
if (!preg_match("/.{2,}/", $server_address))
$input_errors[] = "The field 'Address' is required.";
- if (!preg_match("/.{2,}/", $server_weight))
- $input_errors[] = "The field 'Weight' is required.";
if (!is_numeric($server_weight))
$input_errors[] = "The field 'Weight' value is not a number.";
+
if ($server_port && !is_numeric($server_port))
$input_errors[] = "The field 'Port' value is not a number.";
}