]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Print error when foo=`..` is invalid
authorAlan T. DeKok <aland@freeradius.org>
Thu, 30 Dec 2010 09:36:59 +0000 (10:36 +0100)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 30 Dec 2010 09:36:59 +0000 (10:36 +0100)
It can't occur in the main configuration sections, but it can occur
in an "update" section

src/main/conffile.c

index a6b5f5093195e3d74194808a84eb7e2492bc4d6c..fdeb7b38ff4fb315f1f3e6545667787399a8b5de 100644 (file)
@@ -1549,6 +1549,17 @@ static int cf_section_read(const char *filename, int *lineno, FILE *fp,
                                return -1;
                        }
 
+                       /*
+                        *      These are not allowed.  Print a
+                        *      helpful error message.
+                        */
+                       if ((t3 == T_BACK_QUOTED_STRING) &&
+                           (!this || (strcmp(this->name1, "update") != 0))) {
+                               radlog(L_ERR, "%s[%d]: Syntax error: Invalid string `...` in assignment",
+                                      filename, *lineno);
+                               return -1;
+                       }
+
                        /*
                         *      Handle variable substitution via ${foo}
                         */