]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Don't allow filters on list attr refs
authorNick Porter <nick@portercomputing.co.uk>
Tue, 7 Feb 2023 14:22:42 +0000 (14:22 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 9 Feb 2023 18:41:43 +0000 (12:41 -0600)
By definition there will only ever be one instance of each list, so
filters are meaningless.

src/lib/server/tmpl_tokenize.c

index 9186073c990642ef6bc1216d2d8d59fce54d6c38..67922bb266330595cd94352f0dd752fc6db4d08f 100644 (file)
@@ -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);