From: Alan T. DeKok Date: Sun, 29 Aug 2021 12:26:34 +0000 (-0400) Subject: don't allow: Foo = %{...} X-Git-Tag: release_3_0_24~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01e8c6a477816452b801e8b47ca16319678b6c1f;p=thirdparty%2Ffreeradius-server.git don't allow: Foo = %{...} it must be in a double-quoted string. --- diff --git a/src/main/map.c b/src/main/map.c index 4396ed63ed..97a68da5fc 100644 --- a/src/main/map.c +++ b/src/main/map.c @@ -245,6 +245,18 @@ int map_afrom_cp(TALLOC_CTX *ctx, vp_map_t **out, CONF_PAIR *cp, } break; + case T_BARE_WORD: + /* + * Foo = %{...} + * + * Not allowed! + */ + if ((attr[0] == '%') && (attr[1] == '{')) { + cf_log_err_cp(cp, "Bare expansions are not permitted. They must be in a double-quoted string."); + goto error; + } + /* FALL-THROUGH */ + default: slen = tmpl_afrom_attr_str(ctx, &map->lhs, attr, dst_request_def, dst_list_def, true, true); if (slen <= 0) {