Variable/Attribute expansion in SQL
Matthew Newton
mcn at freeradius.org
Tue Mar 8 19:01:49 UTC 2022
On 08/03/2022 18:55, Alan DeKok wrote:
> On Mar 8, 2022, at 7:48 AM, modesto at hubsoft.com.br wrote:
>> That's odd, I tried that but the literal expression is returned in the Access-Accept:
>
> Hmm... it looks like that expansion is only done if the value contains back-ticks... `%{foo}`.
>
> Unfortunately we can't change this for 3.0. But I'll push a flag to the v3.2.x branch which will allow expansions in SQL replies.
Should be able to use the 'xlat' xlat to force expansion, no?
Something like
update reply {
&Tmp-String-0 := "%{xlat:&Tmp-String-1}"
}
But in either case I'd be very careful to ensure that the data coming
from SQL is only set by the admin, and not from data in an incoming request.
--
Matthew
More information about the Freeradius-Users
mailing list