On Tue, Apr 27, 2004 at 02:43:35PM +0100, Brent Geach wrote: > Hi > I have a requirement to use special characters in the username field. > When the user tries to log in with a * in the username it gets converted to > =2A before going off to the mysql database to check the username and then > obviously gets rejected as no such user. If I add another user with =2A > instead of the * the user is accepted. > gnuradius has a feature where you can specify what the chars the username will > accept but I much prefer the functionality of freeradius. What could I do to > accept the * in the username?
The best answer is prolly "store the * in your database as =2A" as =2A is an encoding of '*' which is database safe. If you require the character '*' itself to appear in the database, you will need to change src/modules/rlm_sql/rlm_sql.c around line 262 to include '*' in the list of safe characters... And recompile. Hmm. Now I think about it, we could solve this problem finally by adding a 'safe-chars' configuration variable to rlm_sql, and trust the local admin to only have characters in the list that are locally safe... Maybe presume alpha-numerics, and a collection of other characters (based on the current list: @abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_: =/ ) are safe, and anything else can be made safe by the local admin? It'd certainly remove my last local patch. :-) -- Paul "TBBle" Hampson, on an alternate email client. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

