[master] questions about recent changes in xlat

Chaigneau, Nicolas nicolas.chaigneau at capgemini.com
Sun Oct 25 00:00:07 CEST 2020


> 
> >  Yes.  We've updated the parser to be smarter.  It no longer need %%.  Which was always ugly.
>
> The new escape sequence is \% which is far more intuitive.



Thanks, but... I can't figure out how to handle escaping of a "%" right now. :/
I've tried the following:

1)
\%{
This returns an error: "Missing closing brace".

2)
\%D
Xlat outputs: "\20201024".

So... I'm confused right now. What am I doing wrong ?



> >> Do you think we could get this to work again without the colon ?
>
> No.
>
> >  Possibly.  We're trying to regularize all of the parsing, expansions, etc.  Which means that some changes creep in.
> > 
> >  The main issue with not using the ":" is that the syntax becomes ambiguous.  Is %{foo} an attribute reference, or an xlat function?  You can't tell.
>
> Exactly.  The old xlat code didn't support multi-pass resolution of attributes or functions because it was impossible to tell what was an attribute and what was a function.
>
> That's why ':' is no longer allowed as a list specifier for attribute references in xlats.


Thanks for the explanation. I'll adapt my functions then. :)




This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.



More information about the Freeradius-Devel mailing list