[master] questions about recent changes in xlat
Chaigneau, Nicolas
nicolas.chaigneau at capgemini.com
Sun Oct 25 17:38:02 CET 2020
> >
> > So... I'm confused right now. What am I doing wrong ?
>
> Not much.
>
> I've added some tests in commit 95f1d5c1.
>
> And yes, \%{ results in \%{.
Alright, I found out why it does not work.
In function _xlat_eval:
len = xlat_tokenize_ephemeral(ctx, &node, NULL,
&FR_SBUFF_IN(fmt, strlen(fmt)),
NULL, &(tmpl_rules_t){ .dict_def = request->dict });
_xlat_eval does not provide a "fr_sbuff_parse_rules_t" with the escape function.
As compared with the code in unit tests, which does:
fr_sbuff_parse_rules_t p_rules = { .escapes = &fr_value_unescape_double };
slen = xlat_tokenize_ephemeral(xlat_ctx, &head, NULL,
&FR_SBUFF_IN(fmt, talloc_array_length(fmt) - 1), &p_rules, NULL);
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