summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_wol.php
diff options
context:
space:
mode:
authorBill Marquette <billm@pfsense.org>2005-04-14 02:21:58 +0000
committerBill Marquette <billm@pfsense.org>2005-04-14 02:21:58 +0000
commit4f3401e0db4bd4964bafe36020e7aebfa62afb59 (patch)
tree197b27020f574a5b8c19289b8315bdefdd338bbf /usr/local/www/services_wol.php
parent629dd875f66411c15fbaefd59fc63f8ffa21f648 (diff)
downloadpfsense-4f3401e0db4bd4964bafe36020e7aebfa62afb59.zip
pfsense-4f3401e0db4bd4964bafe36020e7aebfa62afb59.tar.gz
normalize MAC addresses
Diffstat (limited to 'usr/local/www/services_wol.php')
-rwxr-xr-xusr/local/www/services_wol.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr/local/www/services_wol.php b/usr/local/www/services_wol.php
index 90fe0fa..19164dc 100755
--- a/usr/local/www/services_wol.php
+++ b/usr/local/www/services_wol.php
@@ -42,10 +42,14 @@ if ($_POST || $_GET['mac']) {
unset($input_errors);
if ($_GET['mac']) {
+ /* normalize MAC addresses - lowercase and convert Windows-ized hyphenated MACs to colon delimited */
+ $_GET['mac'] = strtolower(str_replace("-", ":", $_GET['mac']));
$mac = $_GET['mac'];
$if = $_GET['if'];
} else {
- $mac = $_POST['mac_input'];
+ /* normalize MAC addresses - lowercase and convert Windows-ized hyphenated MACs to colon delimited */
+ $_POST['mac'] = strtolower(str_replace("-", ":", $_POST['mac']));
+ $mac = $_POST['mac'];
$if = $_POST['interface'];
}
@@ -110,7 +114,7 @@ if ($_GET['act'] == "del") {
<tr>
<td width="22%" valign="top" class="vncellreq">MAC address</td>
<td width="78%" class="vtable">
- <input name="mac_input" type="text" class="formfld" id="mac_input" size="20" value="<?=htmlspecialchars($mac);?>">
+ <input name="mac" type="text" class="formfld" id="mac" size="20" value="<?=htmlspecialchars($mac);?>">
<br>
Enter a MAC address <span class="vexpl"> in the following format: xx:xx:xx:xx:xx:xx</span></td></tr>
<tr>
OpenPOWER on IntegriCloud