summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_nat_out_edit.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-09-06 17:49:16 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-09-06 17:49:16 +0000
commita4a12dbad61be110909282cb4121434f9a1ab4b5 (patch)
treea21111b850d357e109cfbee8c1f5806c02c92486 /usr/local/www/firewall_nat_out_edit.php
parentdf593437a562cf5b97bbf0a602ed156cf782b447 (diff)
downloadpfsense-a4a12dbad61be110909282cb4121434f9a1ab4b5.zip
pfsense-a4a12dbad61be110909282cb4121434f9a1ab4b5.tar.gz
Only allow number ints for tcp/udp ports.
Ticket #1098
Diffstat (limited to 'usr/local/www/firewall_nat_out_edit.php')
-rwxr-xr-xusr/local/www/firewall_nat_out_edit.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/usr/local/www/firewall_nat_out_edit.php b/usr/local/www/firewall_nat_out_edit.php
index 887d891..ff3ddeb 100755
--- a/usr/local/www/firewall_nat_out_edit.php
+++ b/usr/local/www/firewall_nat_out_edit.php
@@ -94,6 +94,15 @@ if ($_POST) {
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
+ if($_POST['sourceport'] <> "" and !is_numericint($_POST['sourceport']))
+ $input_errors[] = "You must supply either a valid port for the source port entry.";
+
+ if($_POST['dstport'] <> "" and !is_numericint($_POST['dstport']))
+ $input_errors[] = "You must supply either a valid port for the destination port entry.";
+
+ if($_POST['natport'] <> "" and !is_numericint($_POST['natport']))
+ $input_errors[] = "You must supply either a valid port for the nat port entry.";
+
if ($_POST['source_type'] != "any") {
if ($_POST['source'] && !is_ipaddr($_POST['source']) && $_POST['source'] <> "any") {
$input_errors[] = "A valid source must be specified.";
OpenPOWER on IntegriCloud