diff options
author | Renato Botelho <renato@netgate.com> | 2015-09-21 13:39:48 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-09-21 13:39:48 -0300 |
commit | 6298f87a2497920830dfc43ed425728790915c58 (patch) | |
tree | 8f1e484bb7507436fa353bf62dd3722df7a661bc | |
parent | 45be7ac196310301e9247c748c1a459178b6158e (diff) | |
parent | 29736edaf6890c898d4325b14a287614c43fe662 (diff) | |
download | pfsense-6298f87a2497920830dfc43ed425728790915c58.zip pfsense-6298f87a2497920830dfc43ed425728790915c58.tar.gz |
Merge pull request #1923 from phil-davis/patch-5
-rwxr-xr-x | usr/local/www/firewall_aliases_edit.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php index ded7a85..2455d65 100755 --- a/usr/local/www/firewall_aliases_edit.php +++ b/usr/local/www/firewall_aliases_edit.php @@ -146,12 +146,10 @@ if ($_POST) { $input_errors[] = gettext("The alias name must be less than 32 characters long, may not consist of only numbers, and may only contain the following characters") . " a-z, A-Z, 0-9, _."; } /* check for name conflicts */ - if (empty($a_aliases[$id])) { - foreach ($a_aliases as $alias) { - if ($alias['name'] == $_POST['name']) { - $input_errors[] = gettext("An alias with this name already exists."); - break; - } + foreach ($a_aliases as $key => $alias) { + if (($alias['name'] == $_POST['name']) && (empty($a_aliases[$id]) || ($key != $id))) { + $input_errors[] = gettext("An alias with this name already exists."); + break; } } |