Convert mac address to lowercase when saving to avoid duplicates. It fixes #3195

This commit is contained in:
Renato Botelho 2013-09-12 15:01:43 -03:00
parent 4f7bba4647
commit 01ba8ec63d
2 changed files with 2 additions and 2 deletions

View File

@ -175,7 +175,7 @@ include("head.inc");
<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_<?=$mac['action'];?>.gif" width="11" height="11" border="0" alt="icon" />
</td>
<td class="listlr">
<?=strtolower($mac['mac']);?>
<?=$mac['mac'];?>
</td>
<td class="listbg">
<?=htmlspecialchars($mac['descr']);?>&nbsp;

View File

@ -98,7 +98,7 @@ if ($_POST) {
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
$_POST['mac'] = str_replace("-", ":", $_POST['mac']);
$_POST['mac'] = strtolower(str_replace("-", ":", $_POST['mac']));
if ($_POST['mac']) {
if (is_macaddr($_POST['mac'])) {