Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Add data entry check to freeradius /pkg.php?xml=freeradiusauthorizedmacs.xml

    Scheduled Pinned Locked Moved Captive Portal
    7 Posts 4 Posters 978 Views
    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.
    • H
      hardy_rafael17
      last edited by

      Hi… first of all... THANK YOU for pfSense....

      currently I'm using pfsense's captive portal with freeradius... and it works perfectly...  the thing is... I have someone editing the authorized macs using the webui...  the problem is... if that person makes a mistake adding a mac address to the list... the radius server wont start... and that's a problem...

      so I would like to know how to edit that page so that it checks the data before being submited.. just like in the captive portal add mac addres page... where if you enter the wrong data... the webui won't let you add it...

      what files do I have to edit to get that done...

      Thank you so very much in advance....

      1 Reply Last reply Reply Quote 0
      • D
        doktornotor Banned
        last edited by

        There is input validation (800+ LOC) in latest FreeRADIUS version (1.7.7), so this is a non-issue.

        https://github.com/pfsense/FreeBSD-ports/pull/308
        https://github.com/pfsense/FreeBSD-ports/blob/devel/net/pfSense-pkg-freeradius2/files/usr/local/pkg/freeradius.inc#L4598

        1 Reply Last reply Reply Quote 0
        • H
          hardy_rafael17
          last edited by

          Thanks… when is this update going to be available through the webui? my system is up to date... but the freeradius version is 1.7.6_2....

          by the way... I already found the files... so for now Im playing around with the webui....

          Thanks in advanced again...

          you've been of help for me before...!!!

          1 Reply Last reply Reply Quote 0
          • H
            hardy_rafael17
            last edited by

            Please!!! :P

            1 Reply Last reply Reply Quote 0
            • H
              heper
              last edited by

              whenever the core-devs decide to push the new version into the 2.3.x branch.

              you might be able to test the package on 2.4 beta builds

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

                @heper:

                whenever the core-devs decide to push the new version into the 2.3.x branch.

                you might be able to test the package on 2.4 beta builds

                1.7.7 is already up for 2.3.x users. Has been since yesterday morning.

                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!

                1 Reply Last reply Reply Quote 0
                • H
                  hardy_rafael17
                  last edited by

                  Sweet!!!!
                  Thank you again…

                  I modified the line containing the regex so that it only matches lowercase a-f....
                  it's working like a charm...

                  /* MACs input validation */
                  function freeradius_validate_macs($post, &$input_errors) {
                  
                  	// MAC Address
                  	if (!empty($post['varmacsaddress'])) {
                  		if (!preg_match('/([a-f0-9]{2}[-]?){6}/', $post['varmacsaddress'])) {
                  			$input_errors[] = "The 'MAC Address' field must contain a valid MAC address, delimited with '-' character.";
                  		}
                  	}
                  
                  
                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.