Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    26.03 Diagnostics, Arp Table, WOL button links. colons replaced by percent 3A, not accepted by WOL page

    Scheduled Pinned Locked Moved webGUI
    4 Posts 4 Posters 132 Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Offline
      ay
      last edited by

      hi , did a quick search to look for a duplicate forum post

      Under Diagnostics, Arp Table,
      in the Actions column, the WOL button links,

      are not working On Plus 26.03-RELEASE (sg-5100)
      The mac address' colons are replaced with percent encoding
      href linkslook like
      https://172.16.3.253/services_wol.php?if=lan&mac=11%3A22%3A33%3A9b%3A9b%3A72

      The WOL page errors out with
      A valid MAC address must be specified.
      with the percent encoded string in the the mac address field,
      instead of a colon seprated mac address.

      The wol buttons are working in
      Community edition 2.8.1-RELEASE (amd64)
      and Plus 25.07.1-RELEASE
      with href link of format like
      https://192.168.60.1/services_wol.php?if=lan&mac=00:11:22:21:0f:b0

      SteveITSS 1 Reply Last reply Reply Quote 0
      • SteveITSS Offline
        SteveITS Rebel Alliance @ay
        last edited by

        @ay On 25.07 what is the full URL you see when on the /services_wol.php page? On 26.03 /services_wol.php shows the error but the URL does not have the querystring...I am wondering if a GET was changed to POST (upon clicking the link on /diag_arp.php) and the field on /services_wol.php is not decoded before processing.

        The states view page was changed at one point, GET to POST, and as a result one can't right click and open the link in a new tab, because it's not arriving as a POST.

        (@stephenw10)

        To upgrade, select your branch in System/Update/Update Settings. When upgrading, allow 10-15 minutes to reboot, or more depending on packages, CPU, and/or disk speed.
        Only install packages for your version of pfSense.
        Upvote ๐Ÿ‘ helpful posts!

        1 Reply Last reply Reply Quote 0
        • jimpJ Offline
          jimp Rebel Alliance Developer Netgate
          last edited by jimp

          Looks like the way various other pages send the MAC to the WOL page was handled inconsistently and it wasn't being encoded/decoded the same way depending on where the WOL links were.

          This patch should fix it up:

          diff --git a/src/usr/local/www/services_wol.php b/src/usr/local/www/services_wol.php
          index 83014d78a1..f6d14828c9 100644
          --- a/src/usr/local/www/services_wol.php
          +++ b/src/usr/local/www/services_wol.php
          @@ -69,7 +69,7 @@ if ($_POST['Submit'] || $_POST['mac']) {
           
           	if ($_POST['mac']) {
           		/* normalize MAC addresses - lowercase and convert Windows-ized hyphenated MACs to colon delimited */
          -		$mac = strtolower(str_replace("-", ":", $_POST['mac']));
          +		$mac = strtolower(str_replace("-", ":", urldecode($_POST['mac'])));
           		$if = $_POST['if'];
           	}
           
          @@ -193,7 +193,7 @@ print $form;
           								<?=htmlspecialchars(convert_friendly_interface_to_friendly_descr($wolent['interface']));?>
           							</td>
           							<td>
          -								<a href="?mac=<?=$wolent['mac'];?>&amp;if=<?=urlencode($wolent['interface']);?>" usepost><?=strtolower($wolent['mac']);?></a>
          +								<a href="?mac=<?=urlencode($wolent['mac']);?>&amp;if=<?=urlencode($wolent['interface']);?>" usepost><?=strtolower($wolent['mac']);?></a>
           							</td>
           							<td>
           								<?=htmlspecialchars($wolent['descr']);?>
          @@ -201,7 +201,7 @@ print $form;
           							<td>
           								<a class="fa-solid fa-pencil"	title="<?=gettext('Edit Device')?>"	href="services_wol_edit.php?id=<?=$i?>"></a>
           								<a class="fa-solid fa-trash-can"	title="<?=gettext('Delete Device')?>" href="services_wol.php?act=del&amp;id=<?=$i?>" usepost></a>
          -								<a class="fa-solid fa-power-off" title="<?=gettext('Wake Device')?>" href="?mac=<?=$wolent['mac'];?>&amp;if=<?=urlencode($wolent['interface']);?>" usepost></a>
          +								<a class="fa-solid fa-power-off" title="<?=gettext('Wake Device')?>" href="?mac=<?=urlencode($wolent['mac']);?>&amp;if=<?=urlencode($wolent['interface']);?>" usepost></a>
           							</td>
           						</tr>
           					<?php endforeach?>
          diff --git a/src/usr/local/www/widgets/widgets/wake_on_lan.widget.php b/src/usr/local/www/widgets/widgets/wake_on_lan.widget.php
          index 252fc9ad51..3a9f28e556 100644
          --- a/src/usr/local/www/widgets/widgets/wake_on_lan.widget.php
          +++ b/src/usr/local/www/widgets/widgets/wake_on_lan.widget.php
          @@ -129,7 +129,7 @@ if (count($wolcomputers) > 0):
           		<?php endif; ?>
           			</td>
           			<td>
          -				<a href="services_wol.php?mac=<?= $wolent['mac'] ?>&amp;if=<?= urlencode($wolent['interface']) ?>" usepost>
          +				<a href="services_wol.php?mac=<?= urlencode($wolent['mac']) ?>&amp;if=<?= urlencode($wolent['interface']) ?>" usepost>
           				<i class="fa-solid fa-power-off" data-toggle="tooltip" title="<?= gettext("Wake up!") ?>"></i>
           				</a>
           			</td>
          
          

          https://redmine.pfsense.org/issues/16803

          Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          johnpozJ 1 Reply Last reply Reply Quote 2
          • johnpozJ Offline
            johnpoz LAYER 8 Global Moderator @jimp
            last edited by

            @jimp I just tested this - and yup seems to clear it up.. WOL button now works from Arp Table in 26.03

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 26.03 | Lab VMs 2.8.1, 26.03

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.