]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
local variables can't be named for data types
authorAlan T. DeKok <aland@freeradius.org>
Fri, 29 Sep 2023 16:18:47 +0000 (12:18 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 29 Sep 2023 22:43:31 +0000 (18:43 -0400)
string string

is bad.

src/lib/unlang/compile.c

index b2a31b03dfede1e57f6877df72d7b64fd608b9f1..de0c07eae22e7298ac9f47f92c04167755aa7fd8 100644 (file)
@@ -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
         */