Regex problem with 3.0.5 and correct_escapes = false
unbeliever012000
unbeliever012000 at yahoo.co.uk
Sat Nov 22 12:30:03 CET 2014
Small observation on the backwards compatibility of regex handling.
My existing config has the following line within the sites authorised
section;
If ( User-Name =~ /(.*)\/(.*)\\^(.*)/i <file:///\\%5e(.*)\i> ) {
Yes this is nasty, but required to handle a specific format and worked under
3.0.x up to 3.0.5. Under 3.0.5 with correct_escapes set to false this is now
generating an error of "Unexpected test after condition" on the second '('.
I am presuming the '\/' is being seen as the end of the regex within the
parser.
Setting correct_escapes to true, and changing the regex to
/(.*)\/(.*)\^(.*)/i <file:///\\%5e(.*)\i> works. I am not convinced this
is worth fixing, after I think everyone would agree the regex reads better
now. However, it maybe worth extending the radius.conf comment around
correct_escapes to include this edge case.
Geoff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20141122/b88735ee/attachment.html>
More information about the Freeradius-Devel
mailing list