]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
don't include trailing '}' in name, and be sure to set flags
authorAlan T. DeKok <aland@freeradius.org>
Sun, 1 Oct 2023 14:26:31 +0000 (10:26 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 1 Oct 2023 14:26:31 +0000 (10:26 -0400)
src/lib/unlang/xlat_tokenize.c

index e06ad3f5bd9dd32d8e45ecb5e2523dd1de391c94..0e6a399ea64790b378ee52e1abc2718f447cee1b 100644 (file)
@@ -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;
        }