regular expression error in 3.0.x not present in 3.0.6

Aaron Hurt ahurt at ena.com
Thu Mar 5 18:40:51 CET 2015


When old style domain names come into FR they seem to always contain two backslashes ‘DOMAIN\\username’ which is what I am attempting to match.  In 3.0.6 it appears to work with 3 or 4 backslashes with correct_escapes=true but I cannot seem to get the same behavior out of 3.0.x from today.

These both work on 3.0.6 but fail with "Pattern study failed: unknown or incorrect option bit(s) set” on "FreeRADIUS Version 3.0.8 (git #c00210c), for host i386-apple-darwin14.1.0, built on Mar  5 2015 at 10:00:20"

simple_nt_regexp = "^([^\\\\]*)(\\\\(.*))$”
simple_nt_regexp = "^([^\\\]*)(\\\(.*))$”

When I try to reduce the slashes down further to 2 I get the following on 3.0.8

/opt/local/etc/raddb/policy.d/strip-user-domain[9]: Invalid regular expression:
/opt/local/etc/raddb/policy.d/strip-user-domain[9]: ^([^\]*)(\(.*))$
/opt/local/etc/raddb/policy.d/strip-user-domain[9]:                 ^ Pattern compilation failed: missing terminating ] for character class


Again, this is all with ‘correct_escapes=true’ in the radiusd config.

Thank you again,

Aaron

> On Mar 5, 2015, at 11:21 AM, Alan DeKok <aland at deployingradius.com> wrote:
> 
> On Mar 5, 2015, at 12:17 PM, Aaron Hurt via Freeradius-Devel <freeradius-devel at lists.freeradius.org> wrote:
>> The errors in the previous post were with ‘correct_escapes=true’ …
> 
>  Then you shouldn’t need 4 backslashes in a row.  It looks like your regular expression is wrong.
> 
>  Use fewer backslashes.
> 
>  Alan DeKok.
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20150305/44aca43d/attachment-0001.sig>


More information about the Freeradius-Devel mailing list