]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
When a list ref is found in a tmpl set the namespace to NULL
authorNick Porter <nick@portercomputing.co.uk>
Thu, 22 Jan 2026 18:27:08 +0000 (18:27 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Fri, 23 Jan 2026 08:29:21 +0000 (08:29 +0000)
This means that parsing `<list>.<attr>` behaves the same as parsing
`<attr>`

Specifically this allows `<list>.<proto>.<attr>` to work.  Previously,
`<proto>.<attr>` would work for allowing access to attributes from other
namespaces in the `request` list, but `<list>.<proto>.<attr>` would not.

src/lib/server/tmpl_tokenize.c

index 79a663043928aa158b0fbcb33f5f4dc6ad8c023d..98af073244cec96aa97c6d72f6f1458795e20006 100644 (file)
@@ -2131,6 +2131,9 @@ do_suffix:
                        } else if (parent && parent->flags.is_root) {
                                our_parent = namespace = parent;
 
+                       } else if (request_attr_is_list(da)) {
+                               our_parent = namespace = NULL;
+
                        } else if (at_rules->dict_def) {
                                our_parent = namespace = fr_dict_root(at_rules->dict_def);