From: Alan T. DeKok Date: Tue, 6 May 2025 20:13:06 +0000 (-0400) Subject: don't allow in-place `...` X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6082c814a556c2faa5cb5162bbf29115ee033391;p=thirdparty%2Ffreeradius-server.git don't allow in-place `...` 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. --- diff --git a/src/lib/unlang/compile.c b/src/lib/unlang/compile.c index 9ec2d1e75a1..5027c28807a 100644 --- a/src/lib/unlang/compile.c +++ b/src/lib/unlang/compile.c @@ -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; }