summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-03-16 20:11:00 +0545
committerRenato Botelho <garga@FreeBSD.org>2015-03-18 10:57:31 -0300
commitb13f7a8c58f573441568fe717f68b7e3989218c1 (patch)
tree2f79d7a6ab9b14f940a7c5300a2f30ddc5c6df38 /usr
parent08b02994b1204a48f9283d2b431d32472ce51da5 (diff)
downloadpfsense-b13f7a8c58f573441568fe717f68b7e3989218c1.zip
pfsense-b13f7a8c58f573441568fe717f68b7e3989218c1.tar.gz
Do not allow VLAN tag zero
At the moment you can make a VLAN with tag 0. The input validation does not catch it because when $_POST['tag'] = "0" that evaluates to false by PHP. Always make the checks on 'tag' value whenever the 'tag' key is set at all. If the (required) 'tag' key is not set, then that is already checked for by do_input_validation().
Diffstat (limited to 'usr')
-rw-r--r--usr/local/www/interfaces_vlan_edit.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr/local/www/interfaces_vlan_edit.php b/usr/local/www/interfaces_vlan_edit.php
index 4f40cce..4395d12 100644
--- a/usr/local/www/interfaces_vlan_edit.php
+++ b/usr/local/www/interfaces_vlan_edit.php
@@ -80,7 +80,7 @@ if ($_POST) {
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
- if ($_POST['tag'] && (!is_numericint($_POST['tag']) || ($_POST['tag'] < '1') || ($_POST['tag'] > '4094'))) {
+ if (isset($_POST['tag']) && (!is_numericint($_POST['tag']) || ($_POST['tag'] < '1') || ($_POST['tag'] > '4094'))) {
$input_errors[] = gettext("The VLAN tag must be an integer between 1 and 4094.");
}
OpenPOWER on IntegriCloud