Add data entry check to freeradius /pkg.php?xml=freeradiusauthorizedmacs.xml
-
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....
-
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 -
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...!!!
-
Please!!! :P
-
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
-
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.
-
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."; } }