diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-09-12 15:03:12 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-09-12 15:03:12 -0300 |
commit | 204e16db77b2d31f934dab9f976bc8b3c83c40d1 (patch) | |
tree | 04e2a1ef8e61f58ff0b3fa9cb7e51f7913f2660f /usr | |
parent | bf2afff0aaa8408b3a6f699f4a8c8f542889a75a (diff) | |
download | pfsense-204e16db77b2d31f934dab9f976bc8b3c83c40d1.zip pfsense-204e16db77b2d31f934dab9f976bc8b3c83c40d1.tar.gz |
Convert mac address to lowercase when saving to avoid duplicates. It fixes #3195
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/services_captiveportal_mac.php | 2 | ||||
-rwxr-xr-x | usr/local/www/services_captiveportal_mac_edit.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/usr/local/www/services_captiveportal_mac.php b/usr/local/www/services_captiveportal_mac.php index 1cc625b..1f516de 100755 --- a/usr/local/www/services_captiveportal_mac.php +++ b/usr/local/www/services_captiveportal_mac.php @@ -180,7 +180,7 @@ include("head.inc"); $i = 0; foreach ($a_cp[$cpzone]['passthrumac'] as $mac): ?> <tr ondblclick="document.location='services_captiveportal_mac_edit.php?zone=<?=$cpzone;?>&id=<?=$i;?>'"> <td class="listlr"> - <?=strtolower($mac['mac']);?> + <?=$mac['mac'];?> </td> <td class="listbg"> <?=htmlspecialchars($mac['descr']);?> diff --git a/usr/local/www/services_captiveportal_mac_edit.php b/usr/local/www/services_captiveportal_mac_edit.php index bb36500..da41e0a 100755 --- a/usr/local/www/services_captiveportal_mac_edit.php +++ b/usr/local/www/services_captiveportal_mac_edit.php @@ -97,7 +97,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'] && !is_macaddr($_POST['mac']))) { $input_errors[] = sprintf("%s. [%s]", gettext("A valid MAC address must be specified"), $_POST['mac']); |