sql_set_user bug (was Re: Possible bug in unlang?)
Phil Mayers
p.mayers at imperial.ac.uk
Fri Aug 1 13:49:02 CEST 2008
Alan DeKok wrote:
> Phil Mayers wrote:
> ...
>> expand: %{Stripped-User-Name:-%{User-Name:-none}} -> IC\rmtw
>> rlm_sql (sql): sql_set_user escaped user --> 'IC\rmtw'
>> expand: select '%{SQL-User-Name}' -> select 'IC=0Dmtww'
> ...
>> ...so maybe it's the bit that handles xlatname:string?
>
> I think it's the "sql_set_user" function. It should create the
> SQL-User-Name attribute, and then copy the text string *verbatim*. It's
> the extra layer of parsing through pairmake() that's turning \r into a CR.
It's also appending a 2nd "w" on the end, almost as if something is
re-using the original string buffer:
"IC\rmtw"
...and writing "IC<cr>mtw" into it, giving:
"IC<cr>mtww"
I can work up a patch for the sql_set_user functions in rlm_sql and
rlm_sql_log; I take it then this is un-related to the unlang issue?
More information about the Freeradius-Users
mailing list