From: Nick Porter Date: Tue, 7 Feb 2023 14:22:42 +0000 (+0000) Subject: Don't allow filters on list attr refs X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34c4554f637b796f196087aab0ad19fc224aab09;p=thirdparty%2Ffreeradius-server.git Don't allow filters on list attr refs By definition there will only ever be one instance of each list, so filters are meaningless. --- diff --git a/src/lib/server/tmpl_tokenize.c b/src/lib/server/tmpl_tokenize.c index 9186073c990..67922bb2663 100644 --- a/src/lib/server/tmpl_tokenize.c +++ b/src/lib/server/tmpl_tokenize.c @@ -1277,7 +1277,7 @@ static fr_slen_t tmpl_attr_parse_filter(tmpl_attr_error_t *err, tmpl_attr_t *ar, */ if (!fr_sbuff_next_if_char(&our_name, '[')) return 0; - if (at_rules->disallow_filters) { + if (at_rules->disallow_filters || tmpl_attr_is_list_attr(ar)) { fr_strerror_const("Filters not allowed here"); if (err) *err = TMPL_ATTR_ERROR_FILTER_NOT_ALLOWED; fr_sbuff_set_to_start(&our_name);