]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
parse array things only when the quote is array
authorAlan T. DeKok <aland@freeradius.org>
Thu, 15 May 2025 12:24:31 +0000 (08:24 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 15 May 2025 13:17:24 +0000 (09:17 -0400)
src/lib/server/tmpl_tokenize.c

index f6bca85fcf0bc1130d2d0362784dd9294414c351..a2d8f5da76d2fd5a5b1a833e2fcfc0a90af160b0 100644 (file)
@@ -5672,7 +5672,11 @@ ssize_t tmpl_preparse(char const **out, size_t *outlen, char const *in, size_t i
                         *      a few more things inside of a "[...]"
                         *      block.
                         */
-                       if (*p == quote) {
+                       if (*p == '[') {
+                               if (quote != '[') {
+                                       return_P("Invalid location for '['");
+                               }
+
                                p++;
 
                                /*