Revision 3692adec
Added by Phil Davis over 8 years ago
src/usr/local/www/firewall_aliases_edit.php | ||
---|---|---|
175 | 175 |
|
176 | 176 |
/* check for name interface description conflicts */ |
177 | 177 |
foreach ($config['interfaces'] as $interface) { |
178 |
if ($interface['descr'] == $_POST['name']) {
|
|
178 |
if (strcasecmp($interface['descr'], $_POST['name']) == 0) {
|
|
179 | 179 |
$input_errors[] = gettext("An interface description with this name already exists."); |
180 | 180 |
break; |
181 | 181 |
} |
src/usr/local/www/interfaces.php | ||
---|---|---|
490 | 490 |
} |
491 | 491 |
/* description unique? */ |
492 | 492 |
foreach ($ifdescrs as $ifent => $ifdescr) { |
493 |
if ($if != $ifent && $ifdescr == $_POST['descr']) {
|
|
493 |
if ($if != $ifent && (strcasecmp($ifdescr, $_POST['descr']) == 0)) {
|
|
494 | 494 |
$input_errors[] = gettext("An interface with the specified description already exists."); |
495 | 495 |
break; |
496 | 496 |
} |
... | ... | |
499 | 499 |
/* Is the description already used as an alias name? */ |
500 | 500 |
if (is_array($config['aliases']['alias'])) { |
501 | 501 |
foreach ($config['aliases']['alias'] as $alias) { |
502 |
if ($alias['name'] == $_POST['descr']) {
|
|
502 |
if (strcasecmp($alias['name'], $_POST['descr']) == 0) {
|
|
503 | 503 |
$input_errors[] = sprintf(gettext("Sorry, an alias with the name %s already exists."), $_POST['descr']); |
504 | 504 |
} |
505 | 505 |
} |
... | ... | |
508 | 508 |
/* Is the description already used as an interface group name? */ |
509 | 509 |
if (is_array($config['ifgroups']['ifgroupentry'])) { |
510 | 510 |
foreach ($config['ifgroups']['ifgroupentry'] as $ifgroupentry) { |
511 |
if ($ifgroupentry['ifname'] == $_POST['descr']) {
|
|
511 |
if (strcasecmp($ifgroupentry['ifname'], $_POST['descr']) == 0) {
|
|
512 | 512 |
$input_errors[] = sprintf(gettext("Sorry, an interface group with the name %s already exists."), $wancfg['descr']); |
513 | 513 |
} |
514 | 514 |
} |
src/usr/local/www/interfaces_groups_edit.php | ||
---|---|---|
89 | 89 |
} |
90 | 90 |
|
91 | 91 |
foreach ($interface_list_disabled as $gif => $gdescr) { |
92 |
if ($gdescr == $_POST['ifname'] || $gif == $_POST['ifname']) {
|
|
92 |
if ((strcasecmp($gdescr, $_POST['ifname']) == 0) || (strcasecmp($gif, $_POST['ifname']) == 0)) {
|
|
93 | 93 |
$input_errors[] = "The specified group name is already used by an interface. Please choose another name."; |
94 | 94 |
} |
95 | 95 |
} |
Also available in: Unified diff
Interface description must be unique including case