From 748aff36fd6c51f14c317dd207b435e5894aa5e8 Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Tue, 25 Feb 2025 14:30:28 -0500 Subject: [PATCH] skip ":V" for lists and fix parsing of ":V" --- src/main/tmpl.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/tmpl.c b/src/main/tmpl.c index b174cab9cf..aa53e39143 100644 --- a/src/main/tmpl.c +++ b/src/main/tmpl.c @@ -167,6 +167,14 @@ size_t radius_list_name(pair_lists_t *out, char const *name, pair_lists_t def) } } + /* + * Check for the special ':V' tag. + */ + if ((*d == 'V') && !dict_attr_allowed_chars[(uint8_t) d[1]]) { + *out = def; + return 0; + } + *out = fr_substr2int(pair_lists, p, PAIR_LIST_UNKNOWN, (q - p)); if (*out == PAIR_LIST_UNKNOWN) return 0; @@ -715,9 +723,9 @@ ssize_t tmpl_from_attr_substr(vp_tmpl_t *vpt, char const *name, /* * Get the tag from the value. */ - if (*p == 'V') { + if (p[1] == 'V') { attr.tag = TAG_VALUE; - p++; + p += 2; goto do_num; } -- 2.47.2