strange regex question
Xin
knightluffy at live.com
Wed Oct 8 15:42:34 CEST 2014
Hi Alan Dekok,
I'm looking your reply on:
http://lists.freeradius.org/pipermail/freeradius-users/2008-April/027737.htm
l
And I found you give an example as the following below:
> e.g. for : DOMAIN\randy.hall
>
> if (User-Name =~ /^DOMAIN\\(.*)/) {
> update request {
> Stripped-User-Name := "%{1}"
> }
> }
But it fails in my case:
rad_recv: Access-Request packet from host my_ip port 56949, id=250, le
ngth=175
User-Name = "Windows Phone\\test"
NAS-Port-Type = Virtual
....
# Executing section authorize from file
/usr/local/etc/raddb/sites-enabled/defau
lt
+group authorize {
++? if (User-Name =~ /Windows Phone\\(.*)/)
? Evaluating (User-Name =~ /Windows Phone\\(.*)/) -> FALSE
++? if (User-Name =~ /Windows Phone\\(.*)/) -> FALSE
I really don't know why it fails.
I have tested my case in RegexBuddy, and it worked in POSIX ERE, but POSIX
BRE failed.
My FreeRadius version is 2.2.5.
Appreciate for your help.
More information about the Freeradius-Users
mailing list