From: Alan T. DeKok Date: Fri, 29 Sep 2023 16:18:47 +0000 (-0400) Subject: local variables can't be named for data types X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51572bab956469e244d79a7c2b100f9633df9c6a;p=thirdparty%2Ffreeradius-server.git local variables can't be named for data types string string is bad. --- diff --git a/src/lib/unlang/compile.c b/src/lib/unlang/compile.c index b2a31b03dfe..de0c07eae22 100644 --- a/src/lib/unlang/compile.c +++ b/src/lib/unlang/compile.c @@ -1803,6 +1803,14 @@ invalid_type: } } + /* + * We can't name variables for data types. + */ + if (fr_table_value_by_str(fr_type_table, value, FR_TYPE_NULL) != FR_TYPE_NULL) { + cf_log_err(cp, "Invalid variable name '%s'.", value); + return NULL; + } + /* * No local dups */