diff options
author | Bill Marquette <billm@pfsense.org> | 2005-04-14 02:21:58 +0000 |
---|---|---|
committer | Bill Marquette <billm@pfsense.org> | 2005-04-14 02:21:58 +0000 |
commit | 4f3401e0db4bd4964bafe36020e7aebfa62afb59 (patch) | |
tree | 197b27020f574a5b8c19289b8315bdefdd338bbf /usr/local/www/services_captiveportal_mac_edit.php | |
parent | 629dd875f66411c15fbaefd59fc63f8ffa21f648 (diff) | |
download | pfsense-4f3401e0db4bd4964bafe36020e7aebfa62afb59.zip pfsense-4f3401e0db4bd4964bafe36020e7aebfa62afb59.tar.gz |
normalize MAC addresses
Diffstat (limited to 'usr/local/www/services_captiveportal_mac_edit.php')
-rwxr-xr-x | usr/local/www/services_captiveportal_mac_edit.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr/local/www/services_captiveportal_mac_edit.php b/usr/local/www/services_captiveportal_mac_edit.php index 8ef6340..cdf4910 100755 --- a/usr/local/www/services_captiveportal_mac_edit.php +++ b/usr/local/www/services_captiveportal_mac_edit.php @@ -59,7 +59,8 @@ if ($_POST) { do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); - $_POST['mac'] = str_replace("-", ":", $_POST['mac']); + /* normalize MAC addresses - lowercase and convert Windows-ized hyphenated MACs to colon delimited */ + $_POST['mac'] = strtolower(str_replace("-", ":", $_POST['mac'])); if (($_POST['mac'] && !is_macaddr($_POST['mac']))) { $input_errors[] = "A valid MAC address must be specified. [".$_POST['mac']."]"; |