summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_nat_edit.php
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-12-03 13:54:11 +0000
committerErmal Luçi <eri@pfsense.org>2009-12-03 13:54:43 +0000
commit1e578a7f10843f470d2bf5274bbef695a14bb9d0 (patch)
tree9cb418145d2f8ab621e320f0961e971da6783715 /usr/local/www/firewall_nat_edit.php
parentb96cad97eafee7dc4b2cdb143af07f92ff35c68e (diff)
downloadpfsense-1e578a7f10843f470d2bf5274bbef695a14bb9d0.zip
pfsense-1e578a7f10843f470d2bf5274bbef695a14bb9d0.tar.gz
Resolves #146 Add propper validation on alias usage. Allow port type aliases only on port side and other aliases in ip specifications and similar. Introduce a new function is_portoralias to ressemble the is_ipaddroralias to check for the cases.
Diffstat (limited to 'usr/local/www/firewall_nat_edit.php')
-rwxr-xr-xusr/local/www/firewall_nat_edit.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr/local/www/firewall_nat_edit.php b/usr/local/www/firewall_nat_edit.php
index 635f7f4..a1e0c9c 100755
--- a/usr/local/www/firewall_nat_edit.php
+++ b/usr/local/www/firewall_nat_edit.php
@@ -125,15 +125,15 @@ if ($_POST) {
/* only validate the ports if the protocol is TCP, UDP or TCP/UDP */
if(strtoupper($_POST['proto']) == "TCP" or strtoupper($_POST['proto']) == "UDP" or strtoupper($_POST['proto']) == "TCP/UDP") {
- if (($_POST['beginport'] && !is_ipaddroralias($_POST['beginport']) && !is_port($_POST['beginport']))) {
+ if ($_POST['beginport'] && !is_portoralias($_POST['beginport'])) {
$input_errors[] = "The start port must be an integer between 1 and 65535.";
}
- if (($_POST['endport'] && !is_ipaddroralias($_POST['endport']) && !is_port($_POST['endport']))) {
+ if ($_POST['endport'] && !is_portoralias($_POST['endport'])) {
$input_errors[] = "The end port must be an integer between 1 and 65535.";
}
- if (($_POST['localbeginport'] && !is_ipaddroralias($_POST['localbeginport']) && !is_port($_POST['localbeginport']))) {
+ if ($_POST['localbeginport'] && !is_portoralias($_POST['localbeginport'])) {
$input_errors[] = "The local port must be an integer between 1 and 65535.";
}
OpenPOWER on IntegriCloud