diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-04-01 11:56:27 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-04-01 11:56:27 -0300 |
commit | 0ad707c6b93d41bf731c547b49252af4a15a5649 (patch) | |
tree | aefdfd17fe0bf7a1f65ac09599142de661b74bb8 /usr/local/www/system_gateway_groups_edit.php | |
parent | a6637a3116640e06c5ff8bfaf917bbd22c1e2a4a (diff) | |
download | pfsense-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-x | usr/local/www/system_gateway_groups_edit.php | 5 |
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']); |