Username with spaces (MySQL)

Marinko Tarlać mangia81 at gmail.com
Thu Apr 18 10:15:45 CEST 2013


You can add

if ("%{User-Name}" =~ / /) {
	reject
}

at the start of the authorize section.

This rule will reject user(s) in case they add blank spaces before or after the username...




On 18.4.2013 9:47, Wilco Baan Hofman wrote:
>
> On Wed, 2013-04-17 at 22:03 -0500, Andres Gomez Ruiz wrote:
>
>> So I have many users using the same username putting one, two,
>> three, ...etc., spaces after the username.
>>
>>
>> How can I solve this situation?
>> May be with a SQL query that ignores the spaces in the username?
>> (talking about the sql counters)
>>
> Not really a RADIUS question, but this is default behaviour for MySQL.
> Convert the VARCHAR Field to binary or use TRIM() for the counters.
>
> Regards,
>
> Wilco Baan Hofman
>
>
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
>



More information about the Freeradius-Users mailing list