From: Alan T. DeKok Date: Sat, 2 Jul 2022 12:20:47 +0000 (-0400) Subject: fix parsing of &Outer-Realm-Name, with terminating characters X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f858c2cfb64bd71c4a50005b46c752c4e7ddfcb;p=thirdparty%2Ffreeradius-server.git fix parsing of &Outer-Realm-Name, with terminating characters It should not be &Outer - Realm-Name even if "-" is a terminating character. The correct answer is "don't have ambiguous grammars", but it's very difficult to fix that now --- diff --git a/src/lib/server/tmpl_tokenize.c b/src/lib/server/tmpl_tokenize.c index 9fc6fec9dcd..9e9156d3de1 100644 --- a/src/lib/server/tmpl_tokenize.c +++ b/src/lib/server/tmpl_tokenize.c @@ -630,7 +630,7 @@ static fr_slen_t tmpl_request_ref_list_from_substr(TALLOC_CTX *ctx, tmpl_attr_er * We don't want to misidentify the list * as being part of an attribute. */ - if (!fr_sbuff_is_char(&our_in, '.') && !tmpl_substr_terminal_check(&our_in, p_rules)) { + if (!fr_sbuff_is_char(&our_in, '.') && (fr_sbuff_is_in_charset(&our_in, fr_dict_attr_allowed_chars) || !tmpl_substr_terminal_check(&our_in, p_rules))) { goto default_ref; }