]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Enforce dots in realm only if a realm exists
authorAlan T. DeKok <aland@freeradius.org>
Thu, 20 Dec 2012 14:44:47 +0000 (09:44 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 20 Dec 2012 14:44:47 +0000 (09:44 -0500)
Otherwise the historic "bob / bob" test user doesn't work

raddb/policy.d/filter

index b5e13dc28d4204b455863ce79a501a6ba074c50b..8d0c1a4ba550e14f84153e7be13a003780811963 100644 (file)
@@ -103,7 +103,7 @@ filter_username {
        #  must have at least 1 string-dot-string after @ 
        #  e.g. "user@site.com"
        #
-       if (User-Name !~ /@(.+)\\.(.+)$/)  {
+       if ((User-Name =~ /@/) && (User-Name !~ /@(.+)\\.(.+)$/))  {
                update reply {
                        Reply-Message += "Rejected: Realm does not have at least one dot seperator"
                }