From: Alan T. DeKok Date: Sun, 1 Oct 2023 14:26:31 +0000 (-0400) Subject: don't include trailing '}' in name, and be sure to set flags X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11868d6418e96beb5a0f2dd739dccf863888bb87;p=thirdparty%2Ffreeradius-server.git don't include trailing '}' in name, and be sure to set flags --- diff --git a/src/lib/unlang/xlat_tokenize.c b/src/lib/unlang/xlat_tokenize.c index e06ad3f5bd9..0e6a399ea64 100644 --- a/src/lib/unlang/xlat_tokenize.c +++ b/src/lib/unlang/xlat_tokenize.c @@ -1023,7 +1023,7 @@ int xlat_tokenize_expansion(xlat_exp_head_t *head, fr_sbuff_t *in, return ret; } - if (!fr_sbuff_next_if_char(in, '}')) { + if (!fr_sbuff_is_char(in, '}')) { fr_strerror_const("Missing closing brace"); return -1; } @@ -1034,6 +1034,11 @@ int xlat_tokenize_expansion(xlat_exp_head_t *head, fr_sbuff_t *in, tmpl_set_xlat(node->vpt, child); xlat_exp_insert_tail(head, node); + + node->flags = child->flags; + fr_assert(tmpl_xlat(node->vpt) != NULL); + + (void) fr_sbuff_next(in); /* skip '}' */ return ret; }