diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-09-06 17:49:16 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-09-06 17:49:16 +0000 |
commit | a4a12dbad61be110909282cb4121434f9a1ab4b5 (patch) | |
tree | a21111b850d357e109cfbee8c1f5806c02c92486 /usr/local/www/firewall_nat_out_edit.php | |
parent | df593437a562cf5b97bbf0a602ed156cf782b447 (diff) | |
download | pfsense-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-x | usr/local/www/firewall_nat_out_edit.php | 9 |
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."; |