From: Arran Cudbard-Bell Date: Sun, 3 Jul 2011 09:58:01 +0000 (+0200) Subject: NAI policy should always return updated if the User-Name string matched the format X-Git-Tag: release_3_0_0_beta0~733 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eb2802a310fd4196d4be317acfedca4d96d2e7f1;p=thirdparty%2Ffreeradius-server.git NAI policy should always return updated if the User-Name string matched the format --- diff --git a/raddb/policy.conf b/raddb/policy.conf index a0f3d4cb5f6..e3b5e9fe49b 100644 --- a/raddb/policy.conf +++ b/raddb/policy.conf @@ -116,12 +116,15 @@ policy { # regular expressions (or at least not a legible one). # split_username_nai { - if(User-Name =~ /^([^@]*)(@([-[:alnum:]]+\\.[-[:alnum:].]+))?$/){ - update request { - Stripped-User-Name := "%{1}" - Stripped-User-Domain = "%{3}" - } + if(User-Name =~ /^([^@]*)(@([-[:alnum:]]+\\.[-[:alnum:].]+))?$/){ + update request { + Stripped-User-Name := "%{1}" + Stripped-User-Domain = "%{3}" } + # If any of the expansions result in a null string, the update + # section may return something other than updated... + updated + } else{ noop }