summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2017-02-01 09:42:52 +0545
committerGitHub <noreply@github.com>2017-02-01 09:42:52 +0545
commit89ac71d38a4c49e1537e4afe2b34b2457d9817a7 (patch)
tree03092baa5e0c2ed4e409c60a957f3f8930d1910d /src/usr/local/www
parent070379bbc0cf84d82f52a0adfe2bdc6014695f7e (diff)
downloadpfsense-89ac71d38a4c49e1537e4afe2b34b2457d9817a7.zip
pfsense-89ac71d38a4c49e1537e4afe2b34b2457d9817a7.tar.gz
Fix #7183 Do not allow Interface Groups with the same name
I should stop trying bad stuff, there seem to be so many holes to find in the validation :)
Diffstat (limited to 'src/usr/local/www')
-rw-r--r--src/usr/local/www/interfaces_groups_edit.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/usr/local/www/interfaces_groups_edit.php b/src/usr/local/www/interfaces_groups_edit.php
index fcf9b3d..434de73 100644
--- a/src/usr/local/www/interfaces_groups_edit.php
+++ b/src/usr/local/www/interfaces_groups_edit.php
@@ -69,11 +69,9 @@ if ($_POST) {
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
if (!$input_errors) {
- if (!isset($id)) {
- foreach ($a_ifgroups as $groupentry) {
- if ($groupentry['ifname'] == $_POST['ifname']) {
- $input_errors[] = gettext("Group name already exists!");
- }
+ foreach ($a_ifgroups as $groupid => $groupentry) {
+ if ((!isset($id) || ($groupid != $id)) && ($groupentry['ifname'] == $_POST['ifname'])) {
+ $input_errors[] = gettext("Group name already exists!");
}
}
OpenPOWER on IntegriCloud