diff options
author | Ermal Luçi <eri@pfsense.org> | 2009-12-03 13:54:11 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2009-12-03 13:54:43 +0000 |
commit | 1e578a7f10843f470d2bf5274bbef695a14bb9d0 (patch) | |
tree | 9cb418145d2f8ab621e320f0961e971da6783715 /usr/local/www/firewall_nat_edit.php | |
parent | b96cad97eafee7dc4b2cdb143af07f92ff35c68e (diff) | |
download | pfsense-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-x | usr/local/www/firewall_nat_edit.php | 6 |
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."; } |