Spaces in the end of User-Name.

admin bp at iptv.by
Wed Jan 19 08:42:42 CET 2011


Alan DeKok <aland at deployingradius.com> писал(а) в своём письме Wed, 19 Jan  
2011 09:13:35 +0200:

> admin wrote:
>> What i must to specify in a config file of freeradius2 that in each
>> request before its further handling it automatically deleted spaces in  
>> the
>> end of %{User-Name}?
>
>   You need to write a custom rule in "unlang".
>

Something of type such this?

if ("%{User-Name}"=~/([a-zA-Z0-9_.]+)\s+$/i) {
	%{User-Name}=%{1}
}

Where it is necessary to insert it in config file that User-Name changed  
globally before any actions with it?

>   However... my $0.02 is that you shouldn't.  Instead, if you see a
> User-Name with spaces, *reject* it.  The user is trying to play games.

Yes, but it creates many questions from users.






More information about the Freeradius-Users mailing list