]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
don't allow in-place `...`
authorAlan T. DeKok <aland@freeradius.org>
Tue, 6 May 2025 20:13:06 +0000 (16:13 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 7 May 2025 09:25:14 +0000 (05:25 -0400)
we are gradually getting rid of all uses of back-ticks.  And
there is really no reason to allow `...` by itself on a line.

We still allow %foo() on a line by itself.

src/lib/unlang/compile.c

index 9ec2d1e75a11afa15f01cf848416972bc310988c..5027c28807a6c29aba733831d33f9442e1d381c3 100644 (file)
@@ -4933,12 +4933,18 @@ static unlang_t *compile_item(unlang_t *parent, unlang_compile_t *unlang_ctx, CO
                }
 
                /*
-                *      In-place xlat's via %{...}.
+                *      In-place expansions.
                 *
-                *      This should really be removed from the server.
+                *      @todo - allow only function calls, not %{...}
+                *
+                *      @todo don't create a tmpl.  Instead, create an
+                *      xlat.  This functionality is needed for the in-place language functions via
+                *
+                *      language {{{
+                *              ...
+                *      }}}
                 */
-               if ((name[0] == '%') ||
-                   (cf_pair_attr_quote(cp) == T_BACK_QUOTED_STRING)) {
+               if (name[0] == '%') {
                        c = compile_tmpl(parent, unlang_ctx, cf_pair_to_item(cp));
                        goto allocate_number;
                }