]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Allow &list.[*] for selected tmpl parsing
authorNick Porter <nick@portercomputing.co.uk>
Mon, 23 Jan 2023 15:43:43 +0000 (15:43 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 9 Feb 2023 17:01:12 +0000 (11:01 -0600)
src/lib/unlang/compile.c
src/lib/unlang/xlat_builtin.c
src/modules/rlm_cache/rlm_cache.c
src/modules/rlm_json/rlm_json.c

index 9505b8ec424a127c7884891666a087fd68ad7b1d..9968d1fc9be50705101260c46a01ca7a4ddaf8f5 100644 (file)
@@ -1647,6 +1647,7 @@ static unlang_t *compile_update(unlang_t *parent, unlang_compile_t *unlang_ctx,
         */
        t_rules = *(unlang_ctx->rules);
        t_rules.attr.allow_unknown = true;
+       t_rules.attr.allow_wildcard = true;
        RULES_VERIFY(&t_rules);
 
        g = group_allocate(parent, cs, &update_ext);
@@ -3478,6 +3479,7 @@ static unlang_t *compile_foreach(unlang_t *parent, unlang_compile_t *unlang_ctx,
         */
        t_rules = *(unlang_ctx->rules);
        t_rules.attr.allow_unknown = true;
+       t_rules.attr.allow_wildcard = true;
        RULES_VERIFY(&t_rules);
 
        name2 = cf_section_name2(cs);
index f59dcb5d247ddf10a88842e95db870f9a58a090c..d4d6d89b9d8eb83541d7f88391630887bddf9ea6 100644 (file)
@@ -1154,6 +1154,7 @@ static xlat_action_t xlat_func_debug_attr(UNUSED TALLOC_CTX *ctx, UNUSED fr_dcur
                                        .attr = {
                                                .dict_def = request->dict,
                                                .list_def = PAIR_LIST_REQUEST,
+                                               .allow_wildcard = true,
                                                .prefix = TMPL_ATTR_REF_PREFIX_AUTO
                                        }
                                }) <= 0) {
@@ -2752,6 +2753,7 @@ static xlat_action_t xlat_func_pairs(TALLOC_CTX *ctx, fr_dcursor_t *out,
                                        .attr = {
                                                .dict_def = request->dict,
                                                .list_def = PAIR_LIST_REQUEST,
+                                               .allow_wildcard = true,
                                                .prefix = TMPL_ATTR_REF_PREFIX_AUTO
                                        }
                                }) <= 0) {
@@ -3910,6 +3912,7 @@ static xlat_action_t protocol_encode_xlat(TALLOC_CTX *ctx, fr_dcursor_t *out,
                                        .attr = {
                                                .dict_def = request->dict,
                                                .list_def = PAIR_LIST_REQUEST,
+                                               .allow_wildcard = true,
                                                .prefix = TMPL_ATTR_REF_PREFIX_AUTO
                                        }
                                }) <= 0) {
index 3d7d23bb153d1de0524b497e927f5d6931266cc1..dff3e8fdd9094f7440647d2686051407743511ca 100644 (file)
@@ -1015,6 +1015,7 @@ static int mod_instantiate(module_inst_ctx_t const *mctx)
                tmpl_rules_t    parse_rules = {
                        .attr = {
                                .list_def = PAIR_LIST_REQUEST,
+                               .allow_wildcard = true,
                                .allow_foreign = true   /* Because we don't know where we'll be called */
                        }
                };
index 7ddfaa7525086f50a4904eb05388bc5cec3c1ba3..2f13d33ec7db3960a8016fee6c53f4bf2e271445 100644 (file)
@@ -201,6 +201,7 @@ static xlat_action_t json_encode_xlat(TALLOC_CTX *ctx, fr_dcursor_t *out,
                                              &(tmpl_rules_t){
                                                .attr = {
                                                        .list_def = PAIR_LIST_REQUEST,
+                                                       .allow_wildcard = true,
                                                        .dict_def = request->dict
                                                }
                                              });