summaryrefslogtreecommitdiffstats
path: root/usr/local/www/interfaces_vlan_edit.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-03-16 20:11:00 +0545
committerPhil Davis <phil.davis@inf.org>2015-03-16 20:11:00 +0545
commite5d58b682703befda3dfb994272df3544d931dd1 (patch)
tree08a27549b5c5261ffb406b3ec42aa5bc05eb53ad /usr/local/www/interfaces_vlan_edit.php
parente554970781bf8745dfc672e1ce496d10c22e7389 (diff)
downloadpfsense-e5d58b682703befda3dfb994272df3544d931dd1.zip
pfsense-e5d58b682703befda3dfb994272df3544d931dd1.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/local/www/interfaces_vlan_edit.php')
-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