summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_gateway_groups_edit.php
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-04-01 11:56:27 -0300
committerRenato Botelho <garga@FreeBSD.org>2013-04-01 11:56:27 -0300
commit0ad707c6b93d41bf731c547b49252af4a15a5649 (patch)
treeaefdfd17fe0bf7a1f65ac09599142de661b74bb8 /usr/local/www/system_gateway_groups_edit.php
parenta6637a3116640e06c5ff8bfaf917bbd22c1e2a4a (diff)
downloadpfsense-0ad707c6b93d41bf731c547b49252af4a15a5649.zip
pfsense-0ad707c6b93d41bf731c547b49252af4a15a5649.tar.gz
Do not allow to rename a gateway group, as it is for gateways. Fixes #2914
Diffstat (limited to 'usr/local/www/system_gateway_groups_edit.php')
-rwxr-xr-xusr/local/www/system_gateway_groups_edit.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr/local/www/system_gateway_groups_edit.php b/usr/local/www/system_gateway_groups_edit.php
index 728eb88..37662f4 100755
--- a/usr/local/www/system_gateway_groups_edit.php
+++ b/usr/local/www/system_gateway_groups_edit.php
@@ -95,8 +95,11 @@ if ($_POST) {
/* check for overlaps */
if(is_array($a_gateway_groups)) {
foreach ($a_gateway_groups as $gateway_group) {
- if (isset($id) && ($a_gateway_groups[$id]) && ($a_gateway_groups[$id] === $gateway_group))
+ if (isset($id) && ($a_gateway_groups[$id]) && ($a_gateway_groups[$id] === $gateway_group)) {
+ if ($gateway_group['name'] != $_POST['name'])
+ $input_errors[] = gettext("Changing name on a gateway group is not allowed.");
continue;
+ }
if ($gateway_group['name'] == $_POST['name']) {
$input_errors[] = sprintf(gettext('A gateway group with this name "%s" already exists.'), $_POST['name']);
OpenPOWER on IntegriCloud